git-rev
git-rev copied to clipboard
tag(...) does not supply "The Tag" just the closest tag in the tree and supresses important information.
tag(...) does not supply "The Tag" just the closest tag in the tree and supresses important information.
Using --abbrev=0 means that a commit that is 10 away from the latest tag will not show LATEST-TAG-10 but only LATEST-TAG
This is wrong - the command should be fixed or called latestTag(...)
@robshep thanks for bringing this up.
Is there any consensus on changing the name of the method?
I just ran into this myself. IMHO, it's a bad idea to change the method name. I'd create a new method, call it objectTag, or currentTag, or something, and make it find out the tag if it points to HEAD. I don't know how to do that properly, actually, I used git tag --points xxx
, where xxx
is the output of git rev-parse HEAD
.