about summary refs log tree commit homepage
path: root/t/init.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-10 04:53:10 +0000
committerEric Wong <e@80x24.org>2019-01-10 06:46:49 +0000
commit50c822076abee76c3133ffc3482488392eecedfb (patch)
tree903752fbe9b3497cfaa67a8739d901223d91f9a9 /t/init.t
parente041f5446ad266ee24e41a38e0090e2a65167606 (diff)
downloadpublic-inbox-50c822076abee76c3133ffc3482488392eecedfb.tar.gz
This allows v1 tests to continue working on git 1.8.0 for
now.  This allows git 2.1.4 packaged with Debian 8 ("jessie")
to run old tests, at least.

I suppose it's safe to drop Debian 7 ("wheezy") due to our
dependency on git 1.8.0 for "merge-base --is-ancestor".

Writing V2 repositories requires git 2.6 for "get-mark"
support, so mask out tests for older gits.
Diffstat (limited to 't/init.t')
-rw-r--r--t/init.t2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/init.t b/t/init.t
index 1551a304..86b4eb5c 100644
--- a/t/init.t
+++ b/t/init.t
@@ -5,6 +5,7 @@ use warnings;
 use Test::More;
 use PublicInbox::Config;
 use File::Temp qw/tempdir/;
+require './t/common.perl';
 my $tmpdir = tempdir('pi-init-XXXXXX', TMPDIR => 1, CLEANUP => 1);
 use constant pi_init => 'blib/script/public-inbox-init';
 use PublicInbox::Import;
@@ -53,6 +54,7 @@ SKIP: {
                 eval "require $mod";
                 skip "$mod missing for v2", 2 if $@;
         }
+        require_git(2.6, 1) or skip "git 2.6+ required", 2;
         local $ENV{PI_DIR} = "$tmpdir/.public-inbox/";
         my $cfgfile = "$ENV{PI_DIR}/config";
         my @cmd = (pi_init, '-V2', 'v2list', "$tmpdir/v2list",