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

[PATCH] Documentation: explain the meaning of "-g" in git-describe output

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
Mar 22, 2010, 20:45 UTC
Message-ID
<201003222145.33383.markus.heidelberg@web.de>
In-Reply-To
<alpine.LFD.2.00.1003171811420.18017@i5.linux-foundation.org>
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
Linus Torvalds, 2010-03-18 02:19:
Show 10 quoted lines
> 
> On Wed, 17 Mar 2010, Jay Soffian wrote:
> > 
> > My guess, from 908e531 (Add a "git-describe" command, 2005-12-24), is
> > that it's short for "git":
> 
> Indeed. I actually wanted to make it possible to use other SCM's, even if 
> it's stupid. And git is not the only one that uses hashes for versioning, 
> so the "g" prefix is there to allow others that use -hg or monotone or 
> similar to work
I really hadn't thought of this obvious explanation.
 Documentation/git-describe.txt |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 6fc5323..d9311dd 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -105,6 +105,9 @@ The number of additional commits is the number
 of commits which would be displayed by "git log v1.0.4..parent".
 The hash suffix is "-g" + 7-char abbreviation for the tip commit
 of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).
+The "g" prefix stands for "git" and is used to allow describing the version of
+a software depending on the SCM the software is managed with. This is useful
+in an environment where people may use different SCMs.
 
 Doing a 'git describe' on a tag-name will just show the tag name:
 
-- 
1.7.0.3.257.gcd709
Previous: Linus Torvalds
Message 4 of 4 in “meaning of "-g" in git-describe output”
  1. Markus HeidelbergMar 17, 2010
  2. Jay SoffianMar 17, 2010
  3. Linus TorvaldsMar 18, 2010
  4. Documentation: explain the meaning of "-g" in git-describe outputMarkus Heidelberg, Mar 22, 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.