提交 62e27f27 编写于 作者: J Jakub Narebski 提交者: Junio C Hamano

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: NJakub Narebski <jnareb@gmail.com>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 120ddde2
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册