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

Re: git-describe --contains fails on given tree

From
Thomas Rast <trast@student.ethz.ch>
Date
Aug 22, 2010, 21:58 UTC
Message-ID
<201008222358.04504.trast@student.ethz.ch>
In-Reply-To
<alpine.LSU.2.01.1008212241410.23864@obet.zrqbmnf.qr>
Jan Engelhardt wrote:
Show 12 quoted lines
> 
> On Saturday 2010-08-21 21:55, Jakub Narebski wrote:
> >> for some reason, git-describe cannot figure out v1.17~15^2^2 in
> >> the pam_mount tree, despite me being able to actually give
> >> a description that would fit the contains syntax:
> >What does
> >
> >  $ git describe --contains --tags v1.17~15^2^2
> 
> "Cannot describe 95ce..."
> 
> Funny thing is, describing "v1.17~15^2" does work, as does "v1.17~15^1".
That's clock skew:
  $ git show -s --format="%cd" v1.17~15^2 
  Fri Jan 9 04:35:59 2009 +0100
  $ git show -s --format="%cd" v1.17~15^2^2
  Sat Jan 24 16:35:34 2009 +0100

Note how the parent commit is far newer than the child. git-name-rev (which is what really drives git describe --contains) concludes that it can stop searching along this line of history.

Interestingly, --stdin disables this optimization:
  $ git rev-parse v1.17~15^2^2 | git name-rev --stdin
  95ce932690dfce8cbe50b6a3a8949e41a54c8966 (tags/v1.17~15^2^2)
-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Jan EngelhardtNext: Jan Engelhardt
Message 4 of 5 in “git-describe --contains fails on given tree”
  1. Jan EngelhardtAug 21, 2010
  2. Jakub NarebskiAug 21, 2010
  3. Jan EngelhardtAug 21, 2010
  4. Thomas RastAug 22, 2010
  5. Jan EngelhardtAug 23, 2010

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.