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

[PATCH] Make sure an autogenerated version has at least four parts

From
Sam Vilain <sam.vilain@catalyst.net.nz>
Date
May 21, 2007, 02:52 UTC
Message-ID
<11797159411969-git-send-email-sam.vilain@catalyst.net.nz>

Otherwise, a custom "v1.5.2.42.gd00b" is considered newer than a "v1.5.2.1.69.gcafe".

Warning: contains awk.
Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
---
 GIT-VERSION-GEN |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 06c360b..5eb58c3 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -18,7 +18,7 @@ elif test -d .git &&
 	v[0-9]*) : happy ;;
 	esac
 then
-	VN=$(echo "$VN" | sed -e 's/-/./g');
+	VN=$(echo "$VN" | awk -F- 'X=$1 { Y=$2; Z=$3; while (!(X ~ /\..*\..*\./)) { X = X ".0" } print X ( Y ? "." Y : "" ) ( Z ? "." Z : "" ) }');
 else
 	VN="$DEF_VER"
 fi
-- 
1.5.1.1.175.g31e4
Next: Martin Waitz
Message 1 of 7 in “Make sure an autogenerated version has at least four parts”
  1. Make sure an autogenerated version has at least four partsSam Vilain, May 21, 2007
  2. Martin WaitzMay 21, 2007
  3. Jan HudecMay 21, 2007
  4. Martin WaitzMay 21, 2007
  5. Sam VilainMay 25, 2007
  6. Sam VilainMay 25, 2007
  7. Martin WaitzMay 25, 2007

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.