Subject: Re: Local unset override global options

From: Jakub Narebski <[email-masked]>
Date: Mon, 12 Apr 2010 19:02:07 +0200

Junio C Hamano wrote:
> Jakub Narebski <[email-masked]> writes:
> 
> > How does special case of no value, i.e.
> >
> >    [sendemail]
> >         smtpuser
> 
> That is not a special case; that is "boolean true".

Well, it is "boolean true" *if* git-config is used with '--bool'.

If git-send-email.perl used "git config -l -z" to read all its config 
variables at once into hash, like gitweb.perl does in the 
git_parse_project_config() subroutine, it would be able to distinguish 
between those the case of no value:

    [sendemail]
         smtpuser

(in which case "exists $config{'sendemail.smptuser'}" but "not defined 
$config{'sendemail.smtpuser'}", and of empty value

    [sendemail]
         smtpuser = ""

(in which case it is "defined $config{'sendemail.smtpuser'}" but not
true "$config{'sendemail.smtpuser'}).

But as git-send-email.perl uses Git::config to read config variables
one by one (equivalent to "git config --get <variable>"), I think that
also in the case of no value you would end up with $smtp_authuser
defined but empty (and false).

P.S. I wonder if 'sendemail.<identity>' section and 'sendemail.identity'
could help with original problem...
-- 
Jakub Narebski
Poland