]> granicus.if.org Git - git/commitdiff
gitweb: add 'raw' blob_plain link in history overview
authorJob Snijders <job@instituut.net>
Tue, 22 Aug 2017 20:07:29 +0000 (22:07 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 Aug 2017 20:10:48 +0000 (13:10 -0700)
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 <job@instituut.net>
Reviewed-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl

index 3d4a8ee27c96a8e1eb94f95771aeca7825f8a076..6be4c50af07ef1bec7e12cf83dabfa4e52ab7422 100755 (executable)
@@ -5965,6 +5965,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 &&