Re: Local unset override global options
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Apr 12, 2010, 17:02 UTC
- Message-ID
- <201004121902.08345.jnareb@gmail.com>
- In-Reply-To
- <7v1vekn05h.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 8 quoted lines
> Jakub Narebski <jnareb@gmail.com> 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