summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLuben Tuikov <ltuikov@yahoo.com>2006-07-23 20:30:08 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-25 01:21:52 (GMT)
commit93d5f0619ccf10d7a16834b9e3be38871d2aae6c (patch)
treea2b92082db6950a1f9982bbb58f0b9bb4a18673e /gitweb
parentcff0771bfbc8a8c1a432a99bc297a52a5ba94304 (diff)
downloadgit-93d5f0619ccf10d7a16834b9e3be38871d2aae6c.zip
git-93d5f0619ccf10d7a16834b9e3be38871d2aae6c.tar.gz
git-93d5f0619ccf10d7a16834b9e3be38871d2aae6c.tar.bz2
gitweb.cgi: Show "raw" head of project link even when $hash is not defined
Some callers of git_history() do not set $hash of $file_name. Add code to find it, if it is not defined. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.cgi3
1 files changed, 3 insertions, 0 deletions
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 7a61de4..c04283b 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -2326,6 +2326,9 @@ sub git_history {
print "<div>\n" .
$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$hash_base"), -class => "title"}, esc_html($co{'title'})) . "\n" .
"</div>\n";
+ if (!defined $hash && defined $file_name) {
+ $hash = git_get_hash_by_path($hash_base, $file_name);
+ }
if (defined $hash) {
my $ftype = git_get_type($hash);