]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
repobrowse: avoid confusing linkification for "diff"
authorEric Wong <e@80x24.org>
Thu, 31 Mar 2016 03:39:06 +0000 (03:39 +0000)
committerEric Wong <e@80x24.org>
Tue, 5 Apr 2016 18:58:27 +0000 (18:58 +0000)
In /diff/ and /commit/ endpoints, making the word "diff"
a link to the top of the diff is not very useful and may
be confusing.  Avoid wasting bandwidth and overloading
the reader with potential options.

lib/PublicInbox/RepobrowseGitCommit.pm
lib/PublicInbox/RepobrowseGitDiffCommon.pm

index e250e346e40d0431f68d63d2c2b2d10ac45661f2..8fdbc47e9fd2c2e8b6b3cf7f09ddf97e051dca60 100644 (file)
@@ -243,7 +243,7 @@ sub git_diff_cc_hdr {
        delete $req->{anchors}->{$anchor};
        my $cc = $req->{cc} = PublicInbox::Hval->utf8($path);
        $req->{path_cc} = $cc->as_path;
-       qq(<a\nhref=#D\nid="$anchor">diff</a> --$combined $html_path);
+       qq(<a\nid="$anchor">diff</a> --$combined $html_path);
 }
 
 # index abcdef09,01234567..76543210
index 3b2cec6c509724a03f78283926d55e3a3304f545..9ed24d0324ec84579f585b2fcb983dea0ff080fa 100644 (file)
@@ -38,7 +38,7 @@ sub git_diff_ab_hdr ($$$) {
 
        # not wasting bandwidth on links here
        # links in hunk headers are far more useful with line offsets
-       qq(<a\nhref=#D\nid="$anchor">diff</a> --git $html_a $html_b);
+       qq(<a\nid="$anchor">diff</a> --git $html_a $html_b);
 }
 
 # @@ -1,2 +3,4 @@ (regular diff)