summaryrefslogtreecommitdiff
path: root/contrib/credential
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2013-10-08 20:56:50 (GMT)
committerJonathan Nieder <jrnieder@gmail.com>2013-10-08 20:56:50 (GMT)
commit1e155359bf58d7063f75bdb218987aedf62ad550 (patch)
tree08eca311cc7b76c030a982762017c0a8c8b70f4f /contrib/credential
parent0079d6ebd76f4e3fa261b367b0ec2679c47a479a (diff)
parent506524aea503688a91f5b48fe53f630f26734177 (diff)
downloadgit-1e155359bf58d7063f75bdb218987aedf62ad550.zip
git-1e155359bf58d7063f75bdb218987aedf62ad550.tar.gz
git-1e155359bf58d7063f75bdb218987aedf62ad550.tar.bz2
Merge branch 'tz/credential-netrc'
* tz/credential-netrc: git-credential-netrc: fix uninitialized warning
Diffstat (limited to 'contrib/credential')
-rwxr-xr-xcontrib/credential/netrc/git-credential-netrc4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/credential/netrc/git-credential-netrc b/contrib/credential/netrc/git-credential-netrc
index 6c51c43..1571a7b 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},