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

Regarding the determinacy of 'git describe'

From
Andreas Krey <a.krey@gmx.de>
Date
Jan 16, 2015, 13:01 UTC
Message-ID
<20150116130113.GA3220@inner.h.apk.li>
Hi all again,
today another expectation crumbled.

I expected the algo of 'git describe' to be deterministic, but it happens to return different tags in structurally identical repositories. These are generated on each run of a test (and obviously have different dates and thus commit IDs), and 'git describe' doesn't return the same tags in all of them.

Is that expected behaviour?

The repos each look like (commit id and parents truncated to three chars):

538 26d 8f5         (HEAD, origin/r2.4/feature-2, r2.4/feature-2) Merge branch 'r2.4/master' into r2.4/feature-2
    26d         20c feature: 1st part
        8f5 ac6     (origin/r2.4/master, origin/HEAD, r2.4/master) main: 3rd commit
            ac6 20c (tag: r2.4/bl-1) main: 2nd commit
                20c (tag: r2.4/bl-0, origin/sidestep) module: initial

So HEAD is two hops away from both tags (bl-0 via 26d and bl-1 via 8f5), but for one I'd hoped that it always pick bl-1, and especially I'd expect it to be consistent for a given structure).

Andreas
-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800
Next: Andreas Krey
Message 1 of 3 in “Regarding the determinacy of 'git describe'”
  1. Andreas KreyJan 16, 2015
  2. Andreas KreyJan 16, 2015
  3. Andreas KreyJan 19, 2015

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.