about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-31 01:41:15 +0000
committerEric Wong <e@80x24.org>2019-01-31 01:41:15 +0000
commitcdbcf648ed1c28cc5774416f7868d78b4e0e2dba (patch)
treecf7a2811c7f8a8bc7ccb13b5f0a3ac3aaeb9a4d4 /t
parent2d4403cf9972f8ae78aa52fe6ce7a01d9b6757c1 (diff)
downloadpublic-inbox-cdbcf648ed1c28cc5774416f7868d78b4e0e2dba.tar.gz
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.
Diffstat (limited to 't')
-rw-r--r--t/solver_git.t9
1 files changed, 9 insertions, 0 deletions
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};