]> Sergey Matveev's repositories - public-inbox.git/commitdiff
viewvcs: remove patchid line from commit header
authorEric Wong <e@80x24.org>
Tue, 23 Aug 2022 08:31:58 +0000 (08:31 +0000)
committerEric Wong <e@80x24.org>
Tue, 23 Aug 2022 22:40:54 +0000 (22:40 +0000)
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

index 4165a1de1ddaad21061b4a6aa6dc703e7c7c4776..a73fbf0f74994c499dc34a37740426b2533eb240 100644 (file)
@@ -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 ($$) {
 <pre>   commit $H$P
      tree <a href="$upfx$T/s/">$T</a>
    author $au
-committer $co$patchid
+committer $co
 
 <b>$s</b>\n
 EOM