From: Ted Zlatanov Date: Tue, 8 Oct 2013 20:02:02 +0000 (-0400) Subject: git-credential-netrc: fix uninitialized warning X-Git-Tag: v1.8.5-rc0~69^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/506524aea503688a91f5b48fe53f630f26734177 git-credential-netrc: fix uninitialized warning Simple patch to avoid unitialized warning and log what we'll do. Signed-off-by: Ted Zlatanov Signed-off-by: Jonathan Nieder --- diff --git a/contrib/credential/netrc/git-credential-netrc b/contrib/credential/netrc/git-credential-netrc index 6c51c43885..1571a7b269 100755 --- a/contrib/credential/netrc/git-credential-netrc +++ b/contrib/credential/netrc/git-credential-netrc @@ -369,7 +369,9 @@ sub find_netrc_entry { { my $entry_text = join ', ', map { "$_=$entry->{$_}" } keys %$entry; foreach my $check (sort keys %$query) { - if (defined $query->{$check}) { + if (!defined $entry->{$check}) { + log_debug("OK: entry has no $check token, so any value satisfies check $check"); + } elsif (defined $query->{$check}) { log_debug("compare %s [%s] to [%s] (entry: %s)", $check, $entry->{$check},