git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git describe finding wrong tag

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Feb 8, 2011, 07:19 UTC
Message-ID
<4D50EE88.8070005@viscovery.net>
In-Reply-To
<A76F5A9B-6E22-40D5-A8C9-C471A22DF1BE@sb.org>
Am 2/8/2011 5:46, schrieb Kevin Ballard:
Show 15 quoted lines
> I just encountered an odd situation where `git describe` insists on finding the
> wrong tag. In my case, I tagged a branch, then merged it into another branch,
> and now `git describe` in that other branch decides that it should emit a tag
> name that's over 200 commits old rather than the one that's a single commit
> away.
> 
> % git --version
> git version 1.7.4.31.g3f8c4
> % git describe
> build_1.2.2_applestore_1-203-g742967b
> % git describe HEAD^2
> build_1.2.2
> 
> Is there any rational for why git-describe is opting for the much older
> commit?

Most likely, the situation outlined in this commit message applies to your case:

http://git.kernel.org/?p=git/git.git;a=commit;h=80dbae03
Then what you observe is by design.
-- Hannes
Previous: Kevin BallardNext: Kevin Ballard
Message 2 of 3 in “Git describe finding wrong tag”
  1. Kevin BallardFeb 8, 2011
  2. Johannes SixtFeb 8, 2011
  3. Kevin BallardFeb 8, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.