From cdbcf648ed1c28cc5774416f7868d78b4e0e2dba Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 31 Jan 2019 01:41:15 +0000 Subject: solvergit: allow searching on longer-than-needed OIDs public-inbox can only index the abbreviated object_ids in emails, not the full or even longer-than-necessary object_ids. So retry failed object_ids if they're longer than 7 hex characters. --- t/solver_git.t | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 't') diff --git a/t/solver_git.t b/t/solver_git.t index 197a003a..66e63176 100644 --- a/t/solver_git.t +++ b/t/solver_git.t @@ -64,6 +64,15 @@ if (0) { # TODO: check this? diag $z; } +my $oid = $expect; +for my $i (1..2) { + my $more; + my $s = PublicInbox::SolverGit->new($ibx, sub { $more = $_[0] }); + $s->solve($psgi_env, $log, $oid, {}); + is($more->[1], $expect, 'resolved blob to long OID '.$i); + chop($oid); +} + $solver = undef; $res = undef; my $wt_git_dir = $wt_git->{git_dir}; -- cgit v1.2.3-24-ge0c7