git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pierre Habouzit <madcoder@debian.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: martin f krafft <madduck@madduck.net>,
	git discussion list <git@vger.kernel.org>
Subject: Re: git-remote: Use of uninitialized value in string ne, line 248
Date: Wed, 24 Oct 2007 22:39:11 +0200	[thread overview]
Message-ID: <20071024203911.GC10900@artemis.corp> (raw)
In-Reply-To: <7vwstc68bk.fsf@gitster.siamese.dyndns.org>

[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]

On Wed, Oct 24, 2007 at 11:49:51AM +0000, Junio C Hamano wrote:
> martin f krafft <madduck@madduck.net> writes:
> 
> > piper:~> git remote show origin
> > * remote origin
> >   URL: ssh://git.madduck.net/~/git/etc/mailplate.git
> > Use of uninitialized value in string ne at /usr/local/stow/git/bin/git-remote line 248.
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> 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);

  This looks better (wrt the "0" issue raised earlier):

+		next unless (defined($branch->{$branchname}{'REMOTE'}) &&
+			 $branch->{$branchname}{'REMOTE'} eq $name);

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      parent reply	other threads:[~2007-10-24 20:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24 11:08 git-remote: Use of uninitialized value in string ne, line 248 martin f krafft
2007-10-24 11:49 ` Junio C Hamano
2007-10-24 11:59   ` martin f krafft
2007-10-24 19:39   ` Alex Riesen
2007-10-24 20:27     ` martin f krafft
2007-10-24 20:40       ` Ralf Wildenhues
2007-10-25  1:48     ` Junio C Hamano
2007-10-24 20:39   ` Pierre Habouzit [this message]

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=20071024203911.GC10900@artemis.corp \
    --to=madcoder@debian.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=madduck@madduck.net \
    /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).