git-rev icon indicating copy to clipboard operation
git-rev copied to clipboard

tag(...) does not supply "The Tag" just the closest tag in the tree and supresses important information.

Open robshep opened this issue 9 years ago • 2 comments

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 avatar Feb 01 '16 20:02 robshep

@robshep thanks for bringing this up.

Is there any consensus on changing the name of the method?

tblobaum avatar Feb 03 '16 07:02 tblobaum

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.

veselov avatar May 03 '16 20:05 veselov