@matheusbsbs / matheus-bagliano / commits / 6a6459bc8f
Fork 0

git-gui: Handle gitgui tags in version gen.

I've decided to use gitgui-0.5 as the format for tags in the git-gui repository. The prefix of gitgui was chosen here to make its namespace different from the namespace used by git itself, allowing developers to pull both tag namespaces into the same repository. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Feb 12, 2007 at 16:38 UTC 6a6459bc8f1aa9e83b5b46f7c40454891bf5e92a
1 file changed +3 -5
GIT-VERSION-GEN
+3 -5
@@ -1,7 +1,7 @@
1 #!/bin/sh
2
3 GVF=GIT-VERSION-FILE
4 -DEF_VER=v0.5.GIT
4 +DEF_VER=0.5.GIT
5
6 LF='
7 '
@@ -11,10 +11,10 @@ LF='
11 if VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
12 case "$VN" in
13 *$LF*) (exit 1) ;;
14 - v[0-9]*) : happy ;;
14 + gitgui-[0-9]*) : happy ;;
15 esac
16 then
17 - VN=$(echo "$VN" | sed -e 's/-/./g');
17 + VN=$(echo "$VN" | sed -e 's/^gitgui-//;s/-/./g');
18 elif test -f version
19 then
20 VN=$(cat version) || VN="$DEF_VER"
@@ -22,8 +22,6 @@ else
22 VN="$DEF_VER"
23 fi
24
25 -VN=$(expr "$VN" : v*'\(.*\)')
26 -
25 dirty=$(sh -c 'git diff-index --name-only HEAD' 2>/dev/null) || dirty=
26 case "$dirty" in
27 '')