]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: add 'raw' blob_plain link in history overview
authorJob Snijders <redacted>
Tue, 22 Aug 2017 20:07:29 +0000 (22:07 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:33 +0000 (00:51 -0400)
For people that work with very large plain text files it may be easier
if one can bypass viewing the htmlized blob and instead click directly
to the raw file (rather then click through 'blob' and then to 'raw').

Signed-off-by: Job Snijders <redacted>
Reviewed-by: Giuseppe Bilotta <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index d188fafd805bb91bcb6967c345ad24df6b21f6ade3384d0874c3e2179460f5c2..80984e6ac1f9f79e9cb86ee117bdce081d33bc6cd58f1c093a3131436db3357f 100755 (executable)
@@ -5968,6 +5968,9 @@ sub git_history_body {
                      $cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff");
 
                if ($ftype eq 'blob') {
+                       print " | " .
+                             $cgi->a({-href => href(action=>"blob_plain", hash_base=>$commit, file_name=>$file_name)}, "raw");
+
                        my $blob_current = $file_hash;
                        my $blob_parent  = git_get_hash_by_path($commit, $file_name);
                        if (defined $blob_current && defined $blob_parent &&
This page took 0.286904 seconds and 4 git commands to generate.