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

"git describe" documentation and behavior mismatch

From
Daniel Knittl-Frank <knittl89@googlemail.com>
Date
Nov 30, 2017, 18:47 UTC
Message-ID
<CACx-yZ10GiDT=dDeF1EUtM_K4nGd414SDfxLRqGWyXt0ub02Gg@mail.gmail.com>
Hi Git list,

the help page/manpage of the git describe command has an example with the --all flag which should prepend the ref namespace (tags/ or heads/):

Show 7 quoted lines
> With --all, the command can use branch heads as references, so the output shows the reference path as well:
>
>          [torvalds@g5 git]$ git describe --all --abbrev=4 v1.0.5^2
>          tags/v1.0.0-21-g975b
>
>          [torvalds@g5 git]$ git describe --all --abbrev=4 HEAD^
>          heads/lt/describe-7-g975b
Running the above commands in the git.git repository yields a different result:
>     $ git describe --all --abbrev=4 v1.0.5^2
>     v1.0.0-21-g975b3

No "reference path" to see. It is however shown, when the output is a branch name:

>     $ git describe --all --abbrev=4 origin/next
>     heads/next

Is this expected behavior? IOW is the documentation outdated or is the git describe command misbehaving?

Thanks, Daniel

-- 
typed with http://neo-layout.org
Next: Daniel Knittl-Frank
Message 1 of 6 in “"git describe" documentation and behavior mismatch”
  1. Daniel Knittl-FrankNov 30, 2017
  2. Daniel Knittl-FrankNov 30, 2017
  3. Junio C HamanoDec 3, 2017
  4. Daniel Knittl-FrankDec 11, 2017
  5. Daniel Knittl-FrankDec 11, 2017
  6. Junio C HamanoDec 15, 2017

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.