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

[PATCH] GIT-VERSION-GEN: Use git project-version.

From
SBSanti Béjar <sbejar@gmail.com>
Date
Aug 4, 2006, 22:01 UTC
Message-ID
<87vep840um.fsf@gmail.com>

--- Hi *,

There are two little behaviour changes:

1.- the -dirty suffix is converted to .dirty 2.- the version from the file version does not get the -dirty suffix.

 GIT-VERSION-GEN |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 1ce217d..99e35e1 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -3,9 +3,9 @@ #!/bin/sh
 GVF=GIT-VERSION-FILE
 DEF_VER=v1.4.2.GIT
 
-# First try git-describe, then see if there is a version file
+# First try git-project-version, then see if there is a version file
 # (included in release tarballs), then default
-if VN=$(git describe --abbrev=4 HEAD 2>/dev/null); then
+if VN=$(git project-version); then
 	VN=$(echo "$VN" | sed -e 's/-/./g');
 elif test -f version
 then
@@ -16,14 +16,6 @@ fi
 
 VN=$(expr "$VN" : v*'\(.*\)')
 
-dirty=$(sh -c 'git diff-index --name-only HEAD' 2>/dev/null) || dirty=
-case "$dirty" in
-'')
-	;;
-*)
-	VN="$VN-dirty" ;;
-esac
-
 if test -r $GVF
 then
 	VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)
-- 
1.4.2.rc3.g3f0a-dirty
Message 1 of 1 in “GIT-VERSION-GEN: Use git project-version.”
  1. GIT-VERSION-GEN: Use git project-version.Santi Béjar, Aug 4, 2006

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.