]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Fix "heads" view when there is no current branch
[Gitweb] / gitweb.perl
index dac4129e203c54695238a0acbe57407ff131bbaf42d32ba54c55f9097f74ec8d..1ab150d59d7571948e864bf4052561d9969748bd2aab3a4de84eefe4c1816b6e 100755 (executable)
@@ -5634,7 +5634,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);
 
@@ -5643,7 +5643,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 {
This page took 0.205802 seconds and 4 git commands to generate.