From: Jakub Narebski <jnareb@gmail.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: git@vger.kernel.org, Michael J Gruber <git@drmicha.warpmail.net>
Subject: Re: Local unset override global options
Date: Mon, 12 Apr 2010 01:53:01 -0700 (PDT) [thread overview]
Message-ID: <m3pr25f3ye.fsf@localhost.localdomain> (raw)
In-Reply-To: <4BC2D9B5.6070400@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> Stefan Hajnoczi venit, vidit, dixit 12.04.2010 16:23:
>> 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.
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
next prev parent reply other threads:[~2010-04-12 9:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-10 6:54 Local unset override global options Stefan Hajnoczi
2010-04-12 8:13 ` Michael J Gruber
2010-04-12 8:23 ` Stefan Hajnoczi
2010-04-12 8:28 ` Michael J Gruber
2010-04-12 8:53 ` Jakub Narebski [this message]
2010-04-12 15:47 ` Junio C Hamano
2010-04-12 17:02 ` Jakub Narebski
2010-04-12 18:18 ` Junio C Hamano
2010-04-12 18:36 ` Erik Faye-Lund
2010-04-12 21:07 ` Jakub Narebski
2010-04-12 8:35 ` Junio C Hamano
2010-04-12 8:43 ` Stefan Hajnoczi
2010-04-12 15:48 ` Junio C Hamano
2010-04-12 16:07 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3pr25f3ye.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.