Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
gitweb.cgi: Show "raw" head of project link even when $hash is not defined
author
Luben Tuikov
<ltuikov@yahoo.com>
Sun, 23 Jul 2006 20:30:08 +0000
(13:30 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Tue, 25 Jul 2006 01:21:52 +0000
(18:21 -0700)
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>
gitweb/gitweb.cgi
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
cff0771
)
diff --git
a/gitweb/gitweb.cgi
b/gitweb/gitweb.cgi
index 7a61de4a776301d0638152de01e1a3060d54d31f..c04283ba583a66c3543127321cb3d96086ead265 100755
(executable)
--- 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);