git config lossage
authorZefram <zefram@fysh.org>
Sun, 27 Sep 2009 13:30:41 +0000 (15:30 +0200)
committerRafael Garcia-Suarez <rgs@consttype.org>
Sun, 27 Sep 2009 13:30:41 +0000 (15:30 +0200)
The git that I have installed (Debian etch) doesn't support "git
config".
This causes nasty failure in make_patchnum.pl, where it gets a help
message from git, and then blindly interpolates that message into a
command that it passes to the shell for execution.  The attached patch
fixes this.

make_patchnum.pl

index 1644d41..55acb92 100644 (file)
@@ -137,8 +137,10 @@ elsif (-d "$srcdir/.git") {
     my ($remote,$merge);
     if (length $branch) {
         $merge= backtick("git config branch.$branch.merge");
+        $merge = "" unless $? == 0;
         $merge =~ s!^refs/heads/!!;
         $remote= backtick("git config branch.$branch.remote");
+        $remote = "" unless $? == 0;
     }
     $commit_id = backtick("git rev-parse HEAD");
     $describe = backtick("git describe");