From: Job Snijders Date: Tue, 22 Aug 2017 20:07:29 +0000 (+0200) Subject: gitweb: add 'raw' blob_plain link in history overview X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/fcdaccb9eac59d13c375ad30803ba59251656d9759a9e9d5f543b6d4e4a7dc34?ds=sidebyside 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 Reviewed-by: Giuseppe Bilotta Signed-off-by: Junio C Hamano --- diff --git a/gitweb.perl b/gitweb.perl index d188faf..80984e6 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -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 &&