From 2c31b83def9f596a87385747b4af1e331e79ebed Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 23 Aug 2022 08:31:58 +0000 Subject: [PATCH] viewvcs: remove patchid line from commit header I'm considering dropping this entirely since dfpre:, dfpost: dfn:, and s: can be just as powerful, if not more. patchid: is inaccurate if either non-standard diff generation options are used (e.g. -W or -U6); or if a MUAs mangle whitespace. We'll keep patchid: at the top search input box for now, but the textarea at the bottom (and possibly another textarea for a more exact match) is probably more useful and flexible. --- lib/PublicInbox/ViewVCS.pm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index 4165a1de..a73fbf0f 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -102,12 +102,7 @@ sub show_commit_result ($$) { } my $upfx = $ctx->{-upfx} = '../../'; # from "/$INBOX/$OID/s/" my $patchid = (split(/ /, $$bref))[0]; # ignore commit - if (defined $patchid) { - $ctx->{-q_value_html} = "patchid:$patchid"; - $patchid = "\n patchid $patchid"; - } else { - $patchid = ''; - } + $ctx->{-q_value_html} = "patchid:$patchid" if defined $patchid; my $l = $ctx->{-linkify} = PublicInbox::Linkify->new; open my $fh, '<:utf8', "$tmp/h" or die "open $tmp/h: $!"; chop(my $buf = do { local $/ = "\0"; <$fh> }); @@ -141,7 +136,7 @@ sub show_commit_result ($$) {
   commit $H$P
      tree $T
    author $au
-committer $co$patchid
+committer $co
 
 $s\n
 EOM
-- 
2.48.1