git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git describe bug?
@ 2010-04-02 17:20 Dustin Sallings
  2010-04-02 18:31 ` Shawn O. Pearce
  0 siblings, 1 reply; 17+ messages in thread
From: Dustin Sallings @ 2010-04-02 17:20 UTC (permalink / raw)
  To: git


	describe does not choose the most recent tag when multiple tags point to a single commit (for example, when an RC release becomes a proper release).

	There's a bit of conflict in the documentation between the following:

		``tags with newer dates will always be preferred over tags with older dates''

	and the next sentence:

		``If an exact match is found, its name will be output and searching will stop.''

	The code does not allow for multiple exact matches, leading to what I would consider incorrect behavior as shown below:


dhcp-103:/tmp/x 1212% git init
Initialized empty Git repository in /private/tmp/x/.git/
dhcp-103:/tmp/x 1213% git config user.email me@example.com
dhcp-103:/tmp/x 1214% git commit --allow-empty -m initial
[master (root-commit) 7eb97db] initial
dhcp-103:/tmp/x 1215% git commit --allow-empty -m second
[master 86544e0] second
dhcp-103:/tmp/x 1216% git tag -m first 1.0
dhcp-103:/tmp/x 1217% git describe                      # expect 1.0
1.0
dhcp-103:/tmp/x 1218% git tag -m second 2.0
dhcp-103:/tmp/x 1219% git describe                      # expect 2.0
1.0
dhcp-103:/tmp/x 1220% git show-ref 
86544e0414d9d4bc0767eed1ffe36b655638fe81 refs/heads/master
2594a45768685b7fbf69cf2e2fca087cdf3cbfec refs/tags/1.0
175a0473faa32cacff0b42f165d39a9547025432 refs/tags/2.0
dhcp-103:/tmp/x 1221% git cat-file tag refs/tags/1.0
object 86544e0414d9d4bc0767eed1ffe36b655638fe81
type commit
tag 1.0
tagger Dustin Sallings <me@example.com> 1270227996 -0700

first
0.000u 0.001s 0:00.00 0.0%	0+0k 0+0io 0pf+0w
dhcp-103:/tmp/x 1222% git cat-file tag refs/tags/2.0
object 86544e0414d9d4bc0767eed1ffe36b655638fe81
type commit
tag 2.0
tagger Dustin Sallings <me@example.com> 1270228008 -0700

second


-- 
Dustin Sallings

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-04-13 19:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-02 17:20 git describe bug? Dustin Sallings
2010-04-02 18:31 ` Shawn O. Pearce
2010-04-06  9:48   ` Andreas Ericsson
2010-04-11  0:28     ` Shawn O. Pearce
2010-04-11  1:54       ` [PATCH] describe: Break annotated tag ties by tagger date Shawn O. Pearce
2010-04-11  2:36         ` Junio C Hamano
2010-04-11  2:40           ` Shawn O. Pearce
2010-04-12 23:25             ` [PATCH v2 1/5] tag.c: Correct indentation Shawn O. Pearce
2010-04-12 23:25             ` [PATCH v2 2/5] tag.h: Remove unused signature field Shawn O. Pearce
2010-04-12 23:25             ` [PATCH v2 3/5] tag.c: Refactor parse_tag_buffer to be saner to program Shawn O. Pearce
2010-04-12 23:25             ` [PATCH v2 4/5] tag.c: Parse tagger date (if present) Shawn O. Pearce
2010-04-12 23:25             ` [PATCH v2 5/5] describe: Break annotated tag ties by tagger date Shawn O. Pearce
2010-04-13  9:27               ` Andreas Ericsson
2010-04-13  9:32               ` Thomas Rast
2010-04-13 14:08                 ` Shawn O. Pearce
2010-04-13 19:26                   ` Junio C Hamano
2010-04-13 19:46                     ` Shawn O. Pearce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).