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

bug in 'git describe'?

From
Sebastian Kuzminsky <seb@highlab.com>
Date
Sep 24, 2018, 21:45 UTC
Message-ID
<fd340f7b-61c0-2661-bdca-c239e51bc464@highlab.com>

I think I've run in to a bug in 'git describe' (reproduced with git 2.11.0, 2.16.1, and 2.19.0.221.g150f307af).

I've got two tiny git repos whose commit graphs are identical, but where 'git describe' gives different results.

Show 16 quoted lines
>     *   merge 1.1 into 2.0  (HEAD -> release-2.0)
>     |\
>     | *   merge boo into 1.1  (tag: release/1.1.1, release-1.1)
>     | |\
>     | | * dummy commit  (boo)
>     | * | dummy commit  (tag: release/1.1.0)
>     * | |   merge feature into 2.0
>     |\ \ \
>     | * | | dummy commit  (feature)
>     |/ / /
>     * | | dummy commit  (tag: release/2.0.1)
>     * | | dummy commit  (tag: release/2.0.0)
>     |/ /
>     * | dummy commit  (release-1.0)
>     |/
>     * dummy commit  (tag: release/1.0.0)
The tag 'release/1.0.0' is the first commit in history.

The histories differ only in the timestamps of the commits (and thus the SHAs of the commit objects).

Good repo: release/2.0.1-6-gbc33a04 Bad repo: release/2.0.1-8-g2c0a20c

Details, including full copies of both repos, here:
http://highlab.com/~seb/git-describe-bug/
-- 
Sebastian Kuzminsky
Next: Junio C Hamano
Message 1 of 5 in “bug in 'git describe'?”
  1. Sebastian KuzminskySep 24, 2018
  2. Junio C HamanoSep 24, 2018
  3. Sebastian KuzminskySep 25, 2018
  4. Duy NguyenSep 25, 2018
  5. Duy NguyenSep 25, 2018

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.