X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/d9217264f2cfaef77ce6ac6b5f7e56d26f8166d0..2effe01f18007a1b28e11f29b319f2b5cd0ae4df:/make_patchnum.pl?ds=sidebyside diff --git a/make_patchnum.pl b/make_patchnum.pl index fcbfc6c..3f857b5 100644 --- a/make_patchnum.pl +++ b/make_patchnum.pl @@ -19,7 +19,7 @@ This program creates the files holding the information about locally applied patches to the source code. The created files are F and F. -=head2 C +=head2 F Contains status information from git in a form meant to be processed by the tied hash logic of Config.pm. It is actually optional, @@ -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"); @@ -177,7 +178,7 @@ git_unpushed='$unpushed_commit_list'"; $commit_title ||= "Commit id:"; } -# we extract the filename out of the warning header, so dont mess with that +# we extract the filename out of the warning header, so don't mess with that write_files(<<"EOF_HEADER", <<"EOF_CONFIG"); /************************************************************************** * WARNING: 'git_version.h' is automatically generated by make_patchnum.pl