{"thread":{"id":"5605","subject":"[PATCH] gitweb: Fix thinko in git_tags and git_heads","startedAt":"2006-09-19T18:47:27Z","lastAt":"2006-09-19T18:47:27Z","messageCount":1,"participants":["Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"27164","messageId":"200609192047.27454.jnareb@gmail.com","threadId":"5605","inReplyTo":null,"subject":"[PATCH] gitweb: Fix thinko in git_tags and git_heads","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-19T18:47:27Z","receivedAt":"2006-09-19T18:47:27Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"git_get_refs_list always return reference to list (and reference to\nhash which we ignore), so $taglist (in git_tags) and $headlist (in\ngit_heads) are always defined, but @$taglist / @$headlist might be\nempty. Replaced incorrect \"if (defined @$taglist)\" with\n\"if (@$taglist)\" in git_tags and respectively in git_heads.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\n gitweb/gitweb.perl |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 34311ee..9445fa7 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2565,7 +2565,7 @@ sub git_tags {\n \tgit_print_header_div('summary', $project);\n \n \tmy ($taglist) = git_get_refs_list(\"tags\");\n-\tif (defined @$taglist) {\n+\tif (@$taglist) {\n \t\tgit_tags_body($taglist);\n \t}\n \tgit_footer_html();\n@@ -2578,7 +2578,7 @@ sub git_heads {\n \tgit_print_header_div('summary', $project);\n \n \tmy ($headlist) = git_get_refs_list(\"heads\");\n-\tif (defined @$headlist) {\n+\tif (@$headlist) {\n \t\tgit_heads_body($headlist, $head);\n \t}\n \tgit_footer_html();\n-- \n1.4.2.1\n"}]}