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

[RFC PATCH] GIT-VERSION-GEN: set --abbrev=9 to match auto-scaling

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Dec 4, 2016, 20:45 UTC
Message-ID
<22e9dfa0-47fb-d6fd-caf4-c2d87f63f707@ramsayjones.plus.com>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Junio,
I recently noticed that:
    $ make >pout 2>&1
    $ ./git version
    git version 2.11.0.286.g109e8a9
    $ git describe
    v2.11.0-286-g109e8a99d
    $

... for non-release builds, the commit part of the version string was still using an --abbrev=7.

I don't know that it actually matters too much (since it will show as many as necessary, thus the RFC), but it caused me to look twice. ;-)

ATB, Ramsay Jones

 GIT-VERSION-GEN | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 520d6e66e..05601f753 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -12,7 +12,7 @@ if test -f version
 then
 	VN=$(cat version) || VN="$DEF_VER"
 elif test -d ${GIT_DIR:-.git} -o -f .git &&
-	VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
+	VN=$(git describe --match "v[0-9]*" --abbrev=9 HEAD 2>/dev/null) &&
 	case "$VN" in
 	*$LF*) (exit 1) ;;
 	v[0-9]*)
-- 
2.11.0
Next: Jeff King
Message 1 of 12 in “GIT-VERSION-GEN: set --abbrev=9 to match auto-scaling”
  1. GIT-VERSION-GEN: set --abbrev=9 to match auto-scalingRamsay Jones, Dec 4, 2016
  2. Jeff KingDec 5, 2016
  3. Ramsay JonesDec 5, 2016
  4. Junio C HamanoDec 5, 2016
  5. Ramsay JonesDec 5, 2016
  6. Junio C HamanoDec 5, 2016
  7. Ramsay JonesDec 5, 2016
  8. Junio C HamanoDec 5, 2016
  9. Jeff KingDec 6, 2016
  10. Junio C HamanoDec 6, 2016
  11. Jeff KingDec 6, 2016
  12. Ramsay JonesDec 6, 2016

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.