diff options
Diffstat (limited to 'make_patchnum.pl')
-rw-r--r-- | make_patchnum.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/make_patchnum.pl b/make_patchnum.pl index fcbfc6c789..9d83dd59f8 100644 --- a/make_patchnum.pl +++ b/make_patchnum.pl @@ -133,7 +133,8 @@ 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"); + $branch //= ""; my ($remote,$merge); if (length $branch) { $merge= backtick("git config branch.$branch.merge"); |