Use git-svn options to limit its output to one line
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 6 Jul 2011 16:22:31 +0000 (16:22 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 6 Jul 2011 16:22:31 +0000 (16:22 +0000)
This is more reliable than using head and tail.  It also suppresses this
scary message:

error: git-svn died of signal 13

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4148 0192ed92-7a03-0410-a25b-9323aeb14dbd

Makefile

index bf21ea7a5bb5c156f26a2de97c687251f7a7d256..deb8ddc260c5ee64152bdac5a762b27e31465f65 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -72,7 +72,7 @@ $(TOP)/svnversion.h:
                ver=$$(svnversion -nc . | sed -e 's/^[^:]*://;s/[A-Za-z]//'); \
                echo "#define SVNVERSION \"svn r$$ver\"" > $@.tmp; \
        elif [ -d .git ]; then \
-               ver=$$(git svn log | head -n2 | tail -n1 | cut -d\  -f1); \
+               ver=$$(git svn log --oneline --limit 1 | cut -d\  -f1); \
                echo "#define SVNVERSION \"svn $$ver\"" > $@.tmp; \
        elif [ -s SNAPSHOT ]; then \
                ver=$$(sed -e '/^Revision: */!d;s///;q' SNAPSHOT); \