r19011 - gnucash/trunk/util - Insert missing "format:" - otherwise it didn't build for me.
Geert Janssens
gjanssens at code.gnucash.org
Sat Apr 10 08:22:56 EDT 2010
Author: gjanssens
Date: 2010-04-10 08:22:56 -0400 (Sat, 10 Apr 2010)
New Revision: 19011
Trac: http://svn.gnucash.org/trac/changeset/19011
Modified:
gnucash/trunk/util/gnc-svnversion
Log:
Insert missing "format:" - otherwise it didn't build for me.
Additional simplifying git expressions.
Patch by Frank H. Ellenberger
Modified: gnucash/trunk/util/gnc-svnversion
===================================================================
--- gnucash/trunk/util/gnc-svnversion 2010-04-10 09:06:01 UTC (rev 19010)
+++ gnucash/trunk/util/gnc-svnversion 2010-04-10 12:22:56 UTC (rev 19011)
@@ -43,16 +43,17 @@
# If we get here then this is NOT an svn checkout.
# Maybe it's git?
-if test -d "${real_srcdir}"/.git
+real_gitdir="${real_srcdir}"/.git
+if test -d "${real_gitdir}"
then
- githead=`git --git-dir "${real_srcdir}"/.git log -1 --pretty=%h HEAD 2>/dev/null` # short hash only
+ githead=`git --git-dir "${real_gitdir}" log -1 --pretty=format:"%h" HEAD 2>/dev/null` # short hash only
if test $? = 0 ; then
echo -n $githead
# Add a "+" to the hash if there deleted or modified files (not excluded by .gitignore and friends)
# "Ignores" untracked files
- # [ $(git --git-dir "${real_srcdir}"/.git ls-files -dkm 2>/dev/null | wc -l) -gt 0 ] && echo -n "+"
+ # [ $(git --git-dir "${real_gitdir}" ls-files -dkm 2>/dev/null | wc -l) -gt 0 ] && echo -n "+"
# Includes untracked files
- [ $(git --git-dir "${real_srcdir}"/.git ls-files -dkmo --exclude-standard 2>/dev/null | wc -l) -gt 0 ] && echo -n "+"
+ [ $(git --git-dir "${real_gitdir}" ls-files -dkmo --exclude-standard 2>/dev/null | wc -l) -gt 0 ] && echo -n "+"
echo
exit 0
else
More information about the gnucash-changes
mailing list