From 73e17de5421d83bedbf84209585cf2408b9af1ce Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 28 Mar 2021 09:01:16 +0000 Subject: lei blob: support --no-mail switch It's possible for a abbreviated OID to be resolved unambiguously to an email before we attempt to look at externals via xsearch; so provide a way for a user to force searching coderepos. If hints (--oid-a, --path-a, --path-b) are present, we'll assume --no-mail by default, otherwise we'll assume the user wants to look through mail for a matching blob. --- t/solver_git.t | 3 +++ 1 file changed, 3 insertions(+) (limited to 't') diff --git a/t/solver_git.t b/t/solver_git.t index 22714ae5..7bf3ba21 100644 --- a/t/solver_git.t +++ b/t/solver_git.t @@ -34,6 +34,9 @@ test_lei({tmpdir => $tmpdir}, sub { lei_ok('blob', '69df7d5', '-I', $ibx->{inboxdir}); is(sha1_hex("blob ".length($lei_out)."\0".$lei_out), $expect, 'blob contents output'); + my $prev = $lei_out; + lei_ok(qw(blob --no-mail 69df7d5 -I), $ibx->{inboxdir}); + is($lei_out, $prev, '--no-mail works'); # fallbacks lei_ok('blob', $v1_0_0_tag, '-I', $ibx->{inboxdir}); -- cgit v1.2.3-24-ge0c7