git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] GIT-VERSION-GEN: Use git project-version.
@ 2006-08-04 22:01 Santi Béjar
  0 siblings, 0 replies; only message in thread
From: Santi Béjar @ 2006-08-04 22:01 UTC (permalink / raw)
  To: Git Mailing List


---
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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-04 22:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-04 22:01 [PATCH] GIT-VERSION-GEN: Use git project-version Santi Béjar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).