summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-02-21 23:25:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-02-21 23:25:53 (GMT)
commit5609586f652269186d74a4661600dcbd00b1322a (patch)
tree6747105c4c876b7abb782ffbff8f82d860c04f98 /gitweb
parentd30146ac5f92fd5e60bdc106dfe01a69b3d45d27 (diff)
parentfd49e56af68fbdc19a4dc72ca1cf811a239df595 (diff)
downloadgit-5609586f652269186d74a4661600dcbd00b1322a.zip
git-5609586f652269186d74a4661600dcbd00b1322a.tar.gz
git-5609586f652269186d74a4661600dcbd00b1322a.tar.bz2
Merge branch 'jn/gitweb-unborn-head'
* jn/gitweb-unborn-head: gitweb: Fix "heads" view when there is no current branch
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl4
1 files changed, 2 insertions, 2 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 16d3760..b63a5c6 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -5633,7 +5633,7 @@ sub git_tags_body {
sub git_heads_body {
# uses global variable $project
- my ($headlist, $head, $from, $to, $extra) = @_;
+ my ($headlist, $head_at, $from, $to, $extra) = @_;
$from = 0 unless defined $from;
$to = $#{$headlist} if (!defined $to || $#{$headlist} < $to);
@@ -5642,7 +5642,7 @@ sub git_heads_body {
for (my $i = $from; $i <= $to; $i++) {
my $entry = $headlist->[$i];
my %ref = %$entry;
- my $curr = $ref{'id'} eq $head;
+ my $curr = defined $head_at && $ref{'id'} eq $head_at;
if ($alternate) {
print "<tr class=\"dark\">\n";
} else {