Skip to content

Commit

Permalink
git-gui: Handle gitgui tags in version gen.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
spearce committed Feb 12, 2007
1 parent 5d643cd commit 6a6459b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions GIT-VERSION-GEN
@@ -1,7 +1,7 @@
#!/bin/sh

GVF=GIT-VERSION-FILE
DEF_VER=v0.5.GIT
DEF_VER=0.5.GIT

LF='
'
Expand All @@ -11,19 +11,17 @@ LF='
if VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
case "$VN" in
*$LF*) (exit 1) ;;
v[0-9]*) : happy ;;
gitgui-[0-9]*) : happy ;;
esac
then
VN=$(echo "$VN" | sed -e 's/-/./g');
VN=$(echo "$VN" | sed -e 's/^gitgui-//;s/-/./g');
elif test -f version
then
VN=$(cat version) || VN="$DEF_VER"
else
VN="$DEF_VER"
fi

VN=$(expr "$VN" : v*'\(.*\)')

dirty=$(sh -c 'git diff-index --name-only HEAD' 2>/dev/null) || dirty=
case "$dirty" in
'')
Expand Down

0 comments on commit 6a6459b

Please sign in to comment.