using commit count as additional revision id
authorpk910 <philipp@zoelle1.de>
Wed, 13 Jul 2011 13:27:24 +0000 (15:27 +0200)
committerpk910 <philipp@zoelle1.de>
Wed, 13 Jul 2011 13:27:24 +0000 (15:27 +0200)
ircd/version.c.SH

index 92549d5706a5a0f94cc2ad7622776681d085104f..efacd367c164199043ccdecf7d9a53ea596c97d9 100644 (file)
@@ -25,9 +25,13 @@ else \
 
 svn_revision=`svn info | grep Revision | grep -o -E '[0-9]+'`
 if test "x$svn_revision" = "x" ; then
-  svn_revision=`git log -n 1 --pretty="format:git-%h"`
+  svn_revision=`git log -n 1 --pretty="format:%h"`
   if test "x$svn_revision" = "x" ; then
     svn_revision="0"
+  else
+    git_lastcommit=$svn_revision
+    git_commitcount=`git rev-list --all | wc -l | sed "s/[ \t]//g"`
+    svn_revision="git-$git_commitcount-$git_lastcommit"
   fi
 fi