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>
This commit is contained in:
Ted Zlatanov 2013-10-08 16:02:02 -04:00 committed by Jonathan Nieder
parent 5482920919
commit 506524aea5

View File

@ -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},