git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] gitweb: Fix thinko in git_tags and git_heads
Date: Tue, 19 Sep 2006 20:47:27 +0200	[thread overview]
Message-ID: <200609192047.27454.jnareb@gmail.com> (raw)

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>
---
 gitweb/gitweb.perl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 34311ee..9445fa7 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2565,7 +2565,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();
@@ -2578,7 +2578,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();
-- 
1.4.2.1

                 reply	other threads:[~2006-09-19 19:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609192047.27454.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).