]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-remote.perl
git-remote: fix "Use of uninitialized value in string ne"
[thirdparty/git.git] / git-remote.perl
index 8e2dc4de733efe1803d42f5ba4f35ca1be683ad0..11630b1a8b03e9832d4c829b0e61d7a91ba43c77 100755 (executable)
@@ -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 unless (defined $branch->{$branchname}{'REMOTE'} &&
+                            $branch->{$branchname}{'REMOTE'} eq $name);
                my @merged = map {
                        s|^refs/heads/||;
                        $_;