In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/6b44ec6808e2eea9951ccf5c3e5ec4ed5bdbc0ba?hp=c260629609c130544b7b1f0ca490292d084319bc>

- Log -----------------------------------------------------------------
commit 6b44ec6808e2eea9951ccf5c3e5ec4ed5bdbc0ba
Author: Dennis Kaarsemaker <den...@kaarsemaker.net>
Date:   Sun Nov 10 23:17:38 2013 +0100

    Make tests work with detached git dir
    
    In my jenkins replacement, I run all tests with .git outside the work tree,
    pointed to by $GIT_DIR. This is fairly common git practice, so let's make 
the
    testsuite support this and run the relevant porting tests that are skipped
    without this patch.
-----------------------------------------------------------------------

Summary of changes:
 Porting/cmpVERSION.pl | 2 +-
 t/test.pl             | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Porting/cmpVERSION.pl b/Porting/cmpVERSION.pl
index eaf9415..19ad52a 100755
--- a/Porting/cmpVERSION.pl
+++ b/Porting/cmpVERSION.pl
@@ -32,7 +32,7 @@ unless (GetOptions('diffs' => \$diffs,
 die "$0: This does not look like a Perl directory\n"
     unless -f "perl.h" && -d "Porting";
 die "$0: 'This is a Perl directory but does not look like Git working 
directory\n"
-    unless -d ".git";
+    unless (-d ".git" || (exists $ENV{GIT_DIR} && -d $ENV{GIT_DIR}));
 
 my $null = devnull();
 
diff --git a/t/test.pl b/t/test.pl
index 5b1ee18..fcab07a 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -176,6 +176,13 @@ sub find_git_or_skip {
            }
            $source_dir = $where;
        }
+    } elsif (exists $ENV{GIT_DIR}) {
+       my $commit = '8d063cd8450e59ea1c611a2f4f5a21059a2804f1';
+       my $out = `git rev-parse --verify --quiet '$commit^{commit}'`;
+       chomp $out;
+       if($out eq $commit) {
+           $source_dir = '.'
+       }
     }
     if ($source_dir) {
        my $version_string = `git --version`;

--
Perl5 Master Repository

Reply via email to