summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorTimo Hirvonen <tihirvon@gmail.com>2006-06-20 16:41:05 +0300
committerJunio C Hamano <junkio@cox.net>2006-06-22 02:23:12 -0700
commit4c5c20261c5403650a31a91ebce0cc9444182383 (patch)
tree569dce9b9225a2a88a5b79070be339a927c3b928 /gitweb
parent49f582a0401f3b9b9a80ff6fe0dd601520579b7d (diff)
downloadgit-4c5c20261c5403650a31a91ebce0cc9444182383.tar.gz
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-xgitweb/gitweb.cgi4
1 files changed, 3 insertions, 1 deletions
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index f2e50462d9..e2108dee7c 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";