Re: [PATCH] Add 'raw' blob_plain link in history overview

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bump? 

On Wed, Aug 02, 2017 at 08:59:01PM +0200, Job Snijders wrote:
> We often work with very large plain text files in our repositories and
> found it friendlier to the users if we can click directly to the raw
> version of such files.
> 
> This patch adds a 'raw' blob_plain link in history overview.
> 
> Signed-off-by: Job Snijders <job@xxxxxxxxxxxxx>
> ---
>  gitweb/gitweb.perl | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 3d4a8ee27..ad79c518e 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -5961,8 +5961,11 @@ sub git_history_body {
>  		                          href(action=>"commit", hash=>$commit), $ref);
>  		print "</td>\n" .
>  		      "<td class=\"link\">" .
> -		      $cgi->a({-href => href(action=>$ftype, hash_base=>$commit, file_name=>$file_name)}, $ftype) . " | " .
> -		      $cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff");
> +		      $cgi->a({-href => href(action=>$ftype, hash_base=>$commit, file_name=>$file_name)}, $ftype) . " | ";
> +		if ($ftype eq 'blob') {
> +			print $cgi->a({-href => href(action=>"blob_plain", hash_base=>$commit, file_name=>$file_name)}, "raw") . " | ";
> +		}
> +		print $cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff");
>  
>  		if ($ftype eq 'blob') {
>  			my $blob_current = $file_hash;



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux