This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
infnan: more tests.
[perl5.git] / make_patchnum.pl
index ac32808..3f857b5 100644 (file)
@@ -17,9 +17,9 @@ make_patchnum.pl - make patchnum
 
 This program creates the files holding the information
 about locally applied patches to the source code. The created
 
 This program creates the files holding the information
 about locally applied patches to the source code. The created
-files are  C<git_version.h> and C<lib/Config_git.pl>.
+files are  F<git_version.h> and F<lib/Config_git.pl>.
 
 
-=head2 C<lib/Config_git.pl>
+=head2 F<lib/Config_git.pl>
 
 Contains status information from git in a form meant to be processed
 by the tied hash logic of Config.pm. It is actually optional,
 
 Contains status information from git in a form meant to be processed
 by the tied hash logic of Config.pm. It is actually optional,
@@ -134,6 +134,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");
 elsif (-d "$srcdir/.git") {
     # git branch | awk 'BEGIN{ORS=""} /\*/ { print $2 }'
     ($branch) = map { /\* ([^(]\S*)/ ? $1 : () } backtick("git branch");
+    $branch //= "";
     my ($remote,$merge);
     if (length $branch) {
         $merge= backtick("git config branch.$branch.merge");
     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:";
 }
 
     $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
 write_files(<<"EOF_HEADER", <<"EOF_CONFIG");
 /**************************************************************************
 * WARNING: 'git_version.h' is automatically generated by make_patchnum.pl