@matheusbsbs / matheus-bagliano / commits / 62e27f273d
Fork 0

gitweb: Fix thinko in git_tags and git_heads

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>

Jakub Narebski committed Sep 19, 2006 at 20:47 UTC 62e27f273d66afa996cb7aee6cdb25fbedc053f6
1 file changed +2 -2
gitweb/gitweb.perl
+2 -2
@@ -2576,7 +2576,7 @@ sub git_tags {
2576 git_print_header_div('summary', $project);
2577
2578 my ($taglist) = git_get_refs_list("tags");
2579 - if (defined @$taglist) {
2579 + if (@$taglist) {
2580 git_tags_body($taglist);
2581 }
2582 git_footer_html();
@@ -2589,7 +2589,7 @@ sub git_heads {
2589 git_print_header_div('summary', $project);
2590
2591 my ($headlist) = git_get_refs_list("heads");
2592 - if (defined @$headlist) {
2592 + if (@$headlist) {
2593 git_heads_body($headlist, $head);
2594 }
2595 git_footer_html();