* [PATCH 3/5] cindex: --prune needs git 2.6+
2023-12-15 20:22 5% [PATCH 0/5] old git and Test::More fixes Eric Wong
@ 2023-12-15 20:22 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2023-12-15 20:22 UTC (permalink / raw)
To: meta
Older versions of git lack --batch-all-objects, and 2.6+ is
new enough already since v2, lei, etc all depend on it.
---
lib/PublicInbox/CodeSearchIdx.pm | 2 ++
t/cindex.t | 1 +
2 files changed, 3 insertions(+)
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
diff --git a/t/cindex.t b/t/cindex.t
index ab4cde7c..e5f26ec3 100644
--- a/t/cindex.t
+++ b/t/cindex.t
@@ -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');
^ permalink raw reply related [relevance 7%]
* [PATCH 0/5] old git and Test::More fixes
@ 2023-12-15 20:22 5% Eric Wong
2023-12-15 20:22 7% ` [PATCH 3/5] cindex: --prune needs git 2.6+ Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-12-15 20:22 UTC (permalink / raw)
To: meta
This makes the experience nicer for people using CentOS 7.x
out-of-the-box (without 3rd-party repos).
Eric Wong (5):
tests: quiet uninitialized warnings on CentOS 7.x
searchidx: quiet down old git patchid
cindex: --prune needs git 2.6+
git: quiet down `rev-parse --git-path' errors
t/pop3d-limit: use v1 inbox to test on ancient git
lib/PublicInbox/CodeSearchIdx.pm | 2 ++
lib/PublicInbox/Git.pm | 4 +++-
lib/PublicInbox/SearchIdx.pm | 12 ++++++++++--
lib/PublicInbox/TestCommon.pm | 20 ++++++++++----------
t/cindex.t | 1 +
t/cmd_ipc.t | 4 ++--
t/ds-poll.t | 2 +-
t/httpd-corner.t | 2 +-
t/lei-convert.t | 2 +-
t/lei-daemon.t | 2 +-
t/lei-sigpipe.t | 2 +-
t/pop3d-limit.t | 2 +-
12 files changed, 34 insertions(+), 21 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-12-15 20:22 5% [PATCH 0/5] old git and Test::More fixes Eric Wong
2023-12-15 20:22 7% ` [PATCH 3/5] cindex: --prune needs git 2.6+ Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).