Re: Local unset override global options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:
> Stefan Hajnoczi venit, vidit, dixit 12.04.2010 16:23:
>> On Mon, Apr 12, 2010 at 9:13 AM, Michael J Gruber
>> <git@xxxxxxxxxxxxxxxxxxxx> wrote:
>>
>>> have you tried setting it to an empty value?
>> 
>> Yes I have tried it.  An empty string causes the SMTP auth Perl module
>> to choke.  It expects a non-empty username and exits with an error.
>> 
>> On my system I have patched git-send-email to perform this check:
>> 
>> if (defined $smtp_authuser and length $smtp_authuser) {
>> 
>> This works but feels like a hack.  I think unset override could be
>> useful for any git config option, not just sendemail.smtpuser.
>> 
>> I'm not familiar with git internals; do you have other suggestions for
>> solving this issue?
> 
> I don't think it's possible to ignore/unset a specific global config
> value right now, you can only change the path where that is looked for.
> I see two ways to go forward:
> 
> - Change users of the config (such as git-send-email) to treat empty
> values as unset values.
> 
> - Introduce a special value "unset" for config options.

How does special case of no value, i.e.

   [sendemail]
        smtpuser

rather than using empty value

   [sendemail]
        smtpuser = ""

work?

Also if we assume that nobody needs to have support for
sendemail.smtpuser = 0, the condition could be simplified to

  if ($smtp_authuser) {

-- 
Jakub Narebski
Poland
ShadeHawk on #git
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]