diff options
author | Eric Wong <e@80x24.org> | 2021-05-05 10:46:38 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-05-05 17:45:17 +0000 |
commit | 18a0f22e6755af7b283b91722e9e9e649ec9d345 (patch) | |
tree | 39c037407a4f1b182faeb4ff6d7d92f8da29429f /t | |
parent | cf0c7ce3ce81b5c33cb149a7edc3efd99631a57d (diff) | |
download | public-inbox-18a0f22e6755af7b283b91722e9e9e649ec9d345.tar.gz |
Normal git retrieval don't work for Maildir blobs indexed using "lei index". Fortunately, this oddness is limited to the LeiStore class and we can override smsg_eml with a fallback to read blobs from Maildirs.
Diffstat (limited to 't')
-rw-r--r-- | t/solver_git.t | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/solver_git.t b/t/solver_git.t index e566efb3..44cbbfdb 100644 --- a/t/solver_git.t +++ b/t/solver_git.t @@ -27,6 +27,11 @@ my $ibx = create_inbox 'v2', version => 2, $im->add(eml_load 't/solve/0001-simple-mod.patch') or BAIL_OUT; $im->add($patch2) or BAIL_OUT; }; +my $md = "$tmpdir/md"; +File::Path::mkpath([map { $md.$_ } (qw(/ /cur /new /tmp))]); +symlink(abs_path('t/solve/0001-simple-mod.patch'), "$md/cur/foo:2,") or + xbail "symlink: $!"; + my $v1_0_0_tag = 'cb7c42b1e15577ed2215356a2bf925aef59cdd8d'; my $v1_0_0_tag_short = substr($v1_0_0_tag, 0, 16); my $expect = '69df7d565d49fbaaeb0a067910f03dc22cd52bd0'; @@ -70,6 +75,11 @@ test_lei({tmpdir => "$tmpdir/rediff"}, sub { 'got more context with -U9'); }); +test_lei({tmpdir => "$tmpdir/index-eml-only"}, sub { + lei_ok(qw(index), $md); + lei_ok(qw(blob 69df7d5)); # hits LeiSearch->smsg_eml -> lms->local_blob +}); + my $git = PublicInbox::Git->new($git_dir); $ibx->{-repo_objs} = [ $git ]; my $res; |