Re: Local unset override global options
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Apr 12, 2010, 08:28 UTC
- Message-ID
- <4BC2D9B5.6070400@drmicha.warpmail.net>
- In-Reply-To
- <n2ifbd9d3991004120123p7b08a8a2wee380454e9fe9a1d@mail.gmail.com>
Stefan Hajnoczi venit, vidit, dixit 12.04.2010 16:23:
Show 16 quoted lines
> On Mon, Apr 12, 2010 at 9:13 AM, Michael J Gruber
> <git@drmicha.warpmail.net> 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.
Michael