Subject: [PATCH 7/7] gitweb: Always link to plain version of the blob in git_blob.

From: Jakub Narebski <[email-masked]>
Date: Sat, 26 Aug 2006 19:14:26 +0200

Link to plain version of the blob. even if no valid hash_base is given
in "blob" view (in git_blob).

Signed-off-by: Jakub Narebski <[email-masked]>
---
 gitweb/gitweb.perl |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index f6175bb..02d327c 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2461,8 +2461,13 @@ sub git_blob {
 		git_print_page_nav('','', $hash_base,$co{'tree'},$hash_base, $formats_nav);
 		git_print_header_div('commit', esc_html($co{'title'}), $hash_base);
 	} else {
+		$formats_nav .=
+			$cgi->a({-href => href(action=>"blob_plain",
+			                       hash=>$hash, file_name=>$file_name)},
+			        "plain") .
+
 		print "<div class=\"page_nav\">\n" .
-		      "<br/><br/></div>\n" .
+		      "<br/>$formats_nav<br/></div>\n" .
 		      "<div class=\"title\">$hash</div>\n";
 	}
 	git_print_page_path($file_name, "blob", $hash_base);
-- 
1.4.1.1