aboutsummaryrefslogtreecommitdiff
path: root/blob.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-02-28 01:22:36 -0500
committerJunio C Hamano <gitster@pobox.com>2008-02-28 14:28:15 -0800
commit212945d4a85dfa172ea55ec73b1d830ef2d8582f (patch)
tree37d37a0cf329ea9a49cb6e0f433f6d2b433d75f0 /blob.c
parent6d21667206c4c2b10aad99eca1530a4f17c4e61d (diff)
downloadgit-212945d4a85dfa172ea55ec73b1d830ef2d8582f.tar.gz
git-212945d4a85dfa172ea55ec73b1d830ef2d8582f.tar.xz
Teach git-describe to verify annotated tag names before output
If an annotated tag describes a commit we want to favor the name listed in the body of the tag, rather than whatever name it has been stored under locally. By doing so it is easier to converse about tags with others, even if the tags happen to be fetched to a different name than it was given by its creator. To avoid confusion when a tag is stored under a different name (and thus is not readable via git-rev-parse --verify, etc.) we show a warning message if the name of the tag does not match the ref we found it under and if that tag was also selected for output. For example: $ git tag -a -m "i am a test" testtag $ mv .git/refs/tags/testtag .git/refs/tags/bobbytag $ ./git-describe HEAD warning: tag 'testtag' is really 'bobbytag' here testtag $ git tag -d testtag error: tag 'testtag' not found. $ git tag -d bobbytag Deleted tag 'bobbytag' Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'blob.c')
0 files changed, 0 insertions, 0 deletions