diff options
author | Timo Hirvonen <tihirvon@gmail.com> | 2006-06-20 16:41:05 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-06-22 02:23:12 -0700 |
commit | 4c5c20261c5403650a31a91ebce0cc9444182383 (patch) | |
tree | 569dce9b9225a2a88a5b79070be339a927c3b928 /gitweb | |
parent | 49f582a0401f3b9b9a80ff6fe0dd601520579b7d (diff) | |
download | git-4c5c20261c5403650a31a91ebce0cc9444182383.tar.gz git-4c5c20261c5403650a31a91ebce0cc9444182383.tar.xz |
gitweb: Use $hash_base as $search_hash if possible
$hash (h parameter) does not always point to a commit. Use $hash_base as
$search_hash when it is defined.
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.cgi | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi index f2e50462d..e2108dee7 100755 --- a/gitweb/gitweb.cgi +++ b/gitweb/gitweb.cgi @@ -322,7 +322,9 @@ EOF $searchtext = ""; } my $search_hash; - if (defined $hash) { + if (defined $hash_base) { + $search_hash = $hash_base; + } elsif (defined $hash) { $search_hash = $hash; } else { $search_hash = "HEAD"; |