Skip to content

Commit

Permalink
gitweb: Fix thinko in git_tags and git_heads
Browse files Browse the repository at this point in the history
git_get_refs_list always return reference to list (and reference to
hash which we ignore), so $taglist (in git_tags) and $headlist (in
git_heads) are always defined, but @$taglist / @$headlist might be
empty. Replaced incorrect "if (defined @$taglist)" with
"if (@$taglist)" in git_tags and respectively in git_heads.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Sep 20, 2006
1 parent 120ddde commit 62e27f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -2576,7 +2576,7 @@ sub git_tags {
git_print_header_div('summary', $project);

my ($taglist) = git_get_refs_list("tags");
if (defined @$taglist) {
if (@$taglist) {
git_tags_body($taglist);
}
git_footer_html();
Expand All @@ -2589,7 +2589,7 @@ sub git_heads {
git_print_header_div('summary', $project);

my ($headlist) = git_get_refs_list("heads");
if (defined @$headlist) {
if (@$headlist) {
git_heads_body($headlist, $head);
}
git_footer_html();
Expand Down

0 comments on commit 62e27f2

Please sign in to comment.