Re: git-remote: Use of uninitialized value in string ne, line 248

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: martin f krafft <madduck@...>
Cc: git discussion list <git@...>
Date: Wednesday, October 24, 2007 - 7:49 am

martin f krafft <madduck@madduck.net> writes:


Perhaps....

 git-remote.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-remote.perl b/git-remote.perl
index 9ca3e7e..4cee044 100755
--- a/git-remote.perl
+++ b/git-remote.perl
@@ -244,7 +244,8 @@ sub show_remote {
 	print "* remote $name\n";
 	print "  URL: $info->{'URL'}\n";
 	for my $branchname (sort keys %$branch) {
-		next if ($branch->{$branchname}{'REMOTE'} ne $name);
+		next if (!$branch->{$branchname}{'REMOTE'} ||
+			 $branch->{$branchname}{'REMOTE'} ne $name);
 		my @merged = map {
 			s|^refs/heads/||;
 			$_;
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: git-remote: Use of uninitialized value in string ne, lin..., Junio C Hamano, (Wed Oct 24, 7:49 am)