Hi guys,

I was really wondering, why swig-engine.c didn't compile. With Dereks help, I 
found out, that BUILDING_FROM_SVN was false, because the string returned from 
util/gnc-svnversion now was too short - it was empty. So attached is a patch, 
that fixed it for me.

Frank
From e89622e3489e6b85f7ab82484ae2e4fd49764dc7 Mon Sep 17 00:00:00 2001
From: Frank H. Ellenberger <[email protected]>
Date: Thu, 8 Apr 2010 23:18:09 +0200
Subject: [PATCH] Re: r18880 - Bug #611645 gnc-svnversion returns "too long" a string for git users, patch by Jeff Kletsky

Insert missing "format:" - otherwise it didn't build for me.
Additional simplifying git expressions.
---
 util/gnc-svnversion |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/util/gnc-svnversion b/util/gnc-svnversion
index 980cf2e..e264df2 100755
--- a/util/gnc-svnversion
+++ b/util/gnc-svnversion
@@ -43,16 +43,17 @@ fi
 # 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 "+"  
     # 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
-- 
1.6.0.2

_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to