You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using double-quotes to define the gtg-min alias causes the tag to be permanently resolved when defining the alias, rather than when the alias is called.
$ alias gtg-min="git tag -s -a $(git-semver -target minor)"
$ alias gtg-min
alias gtg-min='git tag -s -a 0.2.0'
Then, calling the alias multiple times uses the same tag and fails:
$ gtg-min
fatal: tag '0.2.0' already exists
Using single-quotes fixes the issue:
$ alias gtg-min='git tag -s -a $(git-semver -target minor)'
$ alias gtg-min
alias gtg-min='git tag -s -a $(git-semver -target minor)'
Seems like pretty standard bash behavior but in case the version is interesting:
$ bash --version
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
The text was updated successfully, but these errors were encountered:
With the `gtg-min` alias, using double-quotes calls git-semver immediately and encodes the current tag permanently in the alias. Then, every time you call the alias, it uses the same tag and fails with `fatal: tag 'x.y.z' already exists`.
We change it to single quotes so that the subcommand is not resolved at definition and calling the alias will generate a new tag every time.
Fixesmdomke#43
Using double-quotes to define the
gtg-min
alias causes the tag to be permanently resolved when defining the alias, rather than when the alias is called.Then, calling the alias multiple times uses the same tag and fails:
Using single-quotes fixes the issue:
Seems like pretty standard bash behavior but in case the version is interesting:
The text was updated successfully, but these errors were encountered: