]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Fix thinko in git_tags and git_heads
authorJakub Narebski <redacted>
Tue, 19 Sep 2006 18:47:27 +0000 (20:47 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:10 +0000 (00:07 -0400)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index b011a47f72357c5570742884ec1d469ba1d43163cd6d611a6bc22d984862f546..adfb99f87125399cb6c0f449d19d6f77948b72a7918f0edc175da5e618e14d85 100755 (executable)
@@ -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();
@@ -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();
This page took 0.233333 seconds and 4 git commands to generate.