projects
/
public-inbox.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73e17de
)
lei blob: fail early if no git dirs
author
Eric Wong <e@80x24.org>
Sun, 28 Mar 2021 09:01:17 +0000 (09:01 +0000)
committer
Eric Wong <e@80x24.org>
Sun, 28 Mar 2021 23:01:37 +0000 (23:01 +0000)
This avoids triggering a "BUG:" message in the solver code.
lib/PublicInbox/LeiBlob.pm
patch
|
blob
|
history
diff --git
a/lib/PublicInbox/LeiBlob.pm
b/lib/PublicInbox/LeiBlob.pm
index 4bd8625347396857dcf5d97faa82a9b06f6728fd..f44d8af1c8a0f2cda2294c6db34b25d9403ca4e2 100644
(file)
--- a/
lib/PublicInbox/LeiBlob.pm
+++ b/
lib/PublicInbox/LeiBlob.pm
@@
-103,6
+103,7
@@
sub lei_blob {
my $cgd = get_git_dir('.');
unshift(@$git_dirs, $cgd) if defined $cgd;
}
+ return $lei->fail('no --git-dir to try') unless @$git_dirs;
my $lxs = $lei->lxs_prepare or return;
require PublicInbox::SolverGit;
my $self = bless { lxs => $lxs, oid_b => $blob }, __PACKAGE__;