diff options
author | Eric Wong <e@80x24.org> | 2023-12-15 15:22:47 -0500 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-12-16 10:06:30 +0000 |
commit | aa516f68573f3e3b965ee38f6469225011d078c9 (patch) | |
tree | 64528dce64c2e24dc8aa717f8adca4e6e67ea0b2 | |
parent | 429829bcfdb7b6095fc17d68e914736cc6c64a50 (diff) | |
download | public-inbox-aa516f68573f3e3b965ee38f6469225011d078c9.tar.gz |
Older versions of git lack --batch-all-objects, and 2.6+ is new enough already since v2, lei, etc all depend on it.
-rw-r--r-- | lib/PublicInbox/CodeSearchIdx.pm | 2 | ||||
-rw-r--r-- | t/cindex.t | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/PublicInbox/CodeSearchIdx.pm b/lib/PublicInbox/CodeSearchIdx.pm index 5d420de2..570ff64f 100644 --- a/lib/PublicInbox/CodeSearchIdx.pm +++ b/lib/PublicInbox/CodeSearchIdx.pm @@ -1305,6 +1305,8 @@ sub cidx_run { # main entry point my $v = $self->{-opt}->{"sort-$_"}; push @SORT, "--$_=$v" if defined $v; } + ($self->{-opt}->{prune} && $GIT_VER le v2.6) and + die "W: --prune requires git v2.6+\n"; init_join_prefork($self) } local @IDX_SHARDS = cidx_init($self); # forks workers @@ -209,6 +209,7 @@ EOM SKIP: { # --prune require_cmd($ENV{XAPIAN_DELVE} || 'xapian-delve', 1); + require_git v2.6, 1; my $csrch = PublicInbox::CodeSearch->new("$tmp/ext"); is(scalar($csrch->mset('s:hi')->items), 1, 'got hit'); |