From 506524aea503688a91f5b48fe53f630f26734177 Mon Sep 17 00:00:00 2001 From: Ted Zlatanov Date: Tue, 8 Oct 2013 16:02:02 -0400 Subject: 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 --- contrib/credential/netrc/git-credential-netrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'contrib') 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}, -- cgit v1.2.3