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

git-describe: what is the '-g' prefix good for?

From
DSDirk Süsserott <newsletter@dirk.my1.cc>
Date
Jul 16, 2009, 16:20 UTC
Message-ID
<4A5F5340.9030908@dirk.my1.cc>
Hello there,

I'm a bit surprised about the output of git-describe: if I'm on a tag, git-describe tells the tag's name. Fine. If I commit sth. on top of that, it tells how far I'm away from that tag and the current commit's SHA1. Very fine. But then the SHA1 is preceeded with a '-g'. What's that for?

I really don't want to ask for dropping it (I guess all people rely on it), but does anybody know about the initial intention of that '-g'? Cannot be easier parsing in porcelain scripts because either way the actual state is unambiguously.

Just a curious
     Dirk
Next: Avery Pennarun
Message 1 of 2 in “git-describe: what is the '-g' prefix good for?”
  1. Dirk SüsserottJul 16, 2009
  2. Avery PennarunJul 16, 2009

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.