gto icon indicating copy to clipboard operation
gto copied to clipboard

Escaping required for promotion tags

Open aguschin opened this issue 2 years ago • 3 comments

Rn promotions tags look like rf#prod. # requires escaping in some shells. Is there a better alternative? Need to check @ also.

aguschin avatar Apr 12 '22 10:04 aguschin

: and @ don't require escapes and are common delimiters, I think : is easiest on the eyes and also familiar from other places like $PATH

omesser avatar Apr 16 '22 00:04 omesser

Since we released it with # already, I don't think we need to change this anytime soon.

Still, when we print a git push suggestion, we need to escape those characters I believe (how this will work in shells where you don't need to escape them? Won't it break there?)

e.g. in

$ gto assign xx --stage prod
Created git tag 'xx#prod#1' that assigns stage to version 'v0.0.1'
To push the changes upstream, run:
    git push xx#prod#1

aguschin avatar Aug 31 '22 09:08 aguschin

One more things with this: git push xx#prod#1 miss remote name. E.g. it should be git push origin xx#prod#1 or something. Not sure how to print this in CLI output. git push origin xx#prod#1 or git push <remote> xx#prod#1 to avoid blindly copy-pasting and running the suggestion?

aguschin avatar Sep 06 '22 09:09 aguschin