diff options
author | Eric Wong <e@80x24.org> | 2022-08-29 09:26:36 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-08-29 19:05:47 +0000 |
commit | 207031dbcffd74c8832a7e0e6952af574bc37a2e (patch) | |
tree | 38da1265a826b0dd85f0c38e676d8a8071a33a7c /lib/PublicInbox/ViewVCS.pm | |
parent | e0237a630f249594aeb9649fc2a405a8550cc0ee (diff) | |
download | public-inbox-207031dbcffd74c8832a7e0e6952af574bc37a2e.tar.gz |
Sometimes it can be useful to figure out what's going in on the associated inbox around the time the patch was authored.
Diffstat (limited to 'lib/PublicInbox/ViewVCS.pm')
-rw-r--r-- | lib/PublicInbox/ViewVCS.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index 84358d0e..fd95e24e 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -148,6 +148,7 @@ sub show_commit_start { # ->psgi_qx callback sub cmt_finalize { my ($ctx) = @_; $ctx->{-linkify} //= PublicInbox::Linkify->new; + my $upfx = $ctx->{-upfx} = '../../'; # from "/$INBOX/$OID/s/" # try to keep author and committer dates lined up my ($au, $co) = delete @$ctx{qw(cmt_au cmt_co)}; my $x = length($au) - length($co); @@ -159,9 +160,15 @@ sub cmt_finalize { $au =~ s/>/>$x/; } $_ = ascii_html($_) for ($au, $co); + $au =~ s!(> +)([0-9]{4,}-\S+ \S+)! + my ($gt, $t) = ($1, $2); + $t =~ tr/ :-//d; + qq($gt<a +href="$upfx?t=$t" +title="list contemporary emails">$2</a>) + !e; my $s = $ctx->{-linkify}->to_html(delete $ctx->{cmt_s}); $ctx->{-title_html} = $s; - my $upfx = $ctx->{-upfx} = '../../'; # from "/$INBOX/$OID/s/" my ($P, $p, $pt) = delete @$ctx{qw(-cmt_P -cmt_p -cmt_pt)}; $_ = qq(<a href="$upfx$_/s/">).shift(@$p).'</a> '.shift(@$pt) for @$P; if (@$P == 1) { |