diff options
author | Ted Zlatanov <tzz@lifelogs.com> | 2013-10-08 16:02:02 -0400 |
---|---|---|
committer | Jonathan Nieder <jrnieder@gmail.com> | 2013-10-08 13:56:36 -0700 |
commit | 506524aea503688a91f5b48fe53f630f26734177 (patch) | |
tree | 6a842bbf3a99e694848ee208446b88369bf282b6 /contrib | |
parent | Add contrib/credentials/netrc with GPG support (diff) | |
download | tgif-506524aea503688a91f5b48fe53f630f26734177.tar.xz |
git-credential-netrc: fix uninitialized warning
Simple patch to avoid unitialized warning and log what we'll do.
Signed-off-by: Ted Zlatanov <tzz@lifelogs.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/credential/netrc/git-credential-netrc | 4 |
1 files changed, 3 insertions, 1 deletions
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}, |