make_patchnum.pl: handle not on a branch properly
authorDavid Mitchell <davem@iabyn.com>
Sat, 3 Jul 2010 15:47:05 +0000 (16:47 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sat, 3 Jul 2010 15:47:05 +0000 (16:47 +0100)
make_patchnum.pl

index ac32808..03cb54a 100644 (file)
@@ -133,7 +133,7 @@ if (my $patch_file= read_file(".patch")) {
 }
 elsif (-d "$srcdir/.git") {
     # git branch | awk 'BEGIN{ORS=""} /\*/ { print $2 }'
-    ($branch) = map { /\* ([^(]\S*)/ ? $1 : () } backtick("git branch");
+    ($branch) = map { /\* ([^(]\S*)/ ? $1 : "" } backtick("git branch");
     my ($remote,$merge);
     if (length $branch) {
         $merge= backtick("git config branch.$branch.merge");