Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJob Snijders <job@instituut.net>2017-08-22 23:07:29 +0300
committerJunio C Hamano <gitster@pobox.com>2017-08-22 23:10:48 +0300
commit9662897bedc5ca13d68ed806e951cffa28f17ab4 (patch)
tree42f9704cbaab34825421dc933958a032277175b8 /gitweb
parent4d7268b888d7bb6d675340ec676e4239739d0f6d (diff)
gitweb: add 'raw' blob_plain link in history overview
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>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl3
1 files changed, 3 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 3d4a8ee27c..6be4c50af0 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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 &&