From: Jakub Narebski Date: Mon, 12 Apr 2010 17:02:07 GMT Subject: Re: Local unset override global options Message-ID: <201004121902.08345.jnareb@gmail.com> In-Reply-To: <7v1vekn05h.fsf@alter.siamese.dyndns.org> Junio C Hamano wrote: > Jakub Narebski 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 "), 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.' section and 'sendemail.identity' could help with original problem... -- Jakub Narebski Poland