} $self->{lbuf} = $lbuf; chomp @out; $self->SUPER::translate(@out); } sub srv_atom { my ($ctx, $path) = @_; return if index($path, '//') >= 0 || index($path, '/') == 0; my $max = 50; # TODO configurable my @cmd = ('git', "--git-dir=$ctx->{git}->{git_dir}", qw(log --no-notes --no-color --no-abbrev), $ATOM_FMT, "-$max"); my $tip = $ctx->{qp}->{h}; # same as cgit $ctx->{-feed_title} = $ctx->{git}->{nick}; if (defined($tip)) { push @cmd, $tip; $ctx->{-feed_title} .= ", $tip"; } # else: let git decide based on HEAD if $tip isn't defined push @cmd, '--'; push @cmd, $path if $path ne ''; my $qsp = PublicInbox::Qspawn->new(\@cmd); $qsp->psgi_return($ctx->{env}, undef, \&log2atom_ok, $ctx); } 1;