# scan through inboxes to look for emails which results in
# the oid we want:
- my $ibx = shift(@{$want->{try_ibxs}}) or die 'BUG: {try_ibxs} empty';
+ my $ibx = shift(@{$want->{try_ibxs}}) or return done($self, undef);
if (my $msgs = find_smsgs($self, $ibx, $want)) {
$want->{try_smsgs} = $msgs;
$want->{cur_ibx} = $ibx;
sub new {
my ($class, $ibx, $user_cb, $uarg) = @_;
- bless {
- gits => $ibx->{-repo_objs},
+ bless { # $ibx is undef if coderepo only (see WwwCoderepo)
+ gits => $ibx ? $ibx->{-repo_objs} : undef,
user_cb => $user_cb,
uarg => $uarg,
# -cur_di, -qsp_err, -msg => temp fields for Qspawn callbacks
# TODO: config option for searching related inboxes
- inboxes => [ $ibx ],
+ inboxes => $ibx ? [ $ibx ] : [],
}, $class;
}
open $ctx->{lh}, '+>>', "$ctx->{-tmp}/solve.log" or die "open: $!";
my $solver = PublicInbox::SolverGit->new($ctx->{ibx},
\&solve_result, $ctx);
+ $solver->{gits} //= [ $ctx->{git} ];
$solver->{tmp} = $ctx->{-tmp}; # share tmpdir
# PSGI server will call this immediately and give us a callback (-wcb)
sub {
}
$path_info =~ m!\A/(.+?)/\z! and
($ctx->{git} = $self->{"\0$1"}) and return summary($self, $ctx);
+ $path_info =~ m!\A/(.+?)/([a-f0-9]+)/s/\z! and
+ ($ctx->{git} = $self->{"\0$1"}) and
+ return PublicInbox::ViewVCS::show($ctx, $2);
+
if ($path_info =~ m!\A/(.+?)\z! and ($git = $self->{"\0$1"})) {
my $qs = $ctx->{env}->{QUERY_STRING};
my $url = $git->base_url($ctx->{env});