git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Olaf Hering <olaf@aepfle.de>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Subject: Re: How to undo previously set configuration?
Date: Thu, 5 Apr 2018 12:32:27 -0400	[thread overview]
Message-ID: <20180405163227.GA25224@sigill.intra.peff.net> (raw)
In-Reply-To: <20180405152525.13d1c776.olaf@aepfle.de>

On Thu, Apr 05, 2018 at 03:25:25PM +0200, Olaf Hering wrote:

> Am Thu, 05 Apr 2018 13:21:02 +0200
> schrieb Ævar Arnfjörð Bjarmason <avarab@gmail.com>:
> 
> > I'm assuming you mean something like:
> >         [user]
> >         # This is an error
> >         -email
> 
> Yes. Just some flag to say "whatever value this variable has from
> earlier parsing, forget it in case it really exists". Just like "unset
> PATH" in bash.
> 
> I do not know the git internals, so can not really help with the case.

The general strategy in Git's config is that instead of "unsetting", you
should overwrite with whatever value you _do_ want. So a config option
like sendemail.smtpauth should accept some kind of empty or "none" value
to disable auth.

Most single-value config options should work this way (and if one
doesn't, I'd say that's a bug we should fix).

Multi-valued config (e.g., "remote.*.fetch") is harder, since it's
inherently a list where each new instance adds to the list. We've
discussed there having an empty value reset the list, but it's not
applied consistently.

-Peff

  reply	other threads:[~2018-04-05 16:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-05  7:23 How to configure sendemail for no-auth? Olaf Hering
2018-04-05  8:42 ` How to undo previously set configuration? Ævar Arnfjörð Bjarmason
2018-04-05  8:49   ` Olaf Hering
2018-04-05 11:21     ` Ævar Arnfjörð Bjarmason
2018-04-05 12:03       ` Randall S. Becker
2018-04-05 13:25       ` Olaf Hering
2018-04-05 16:32         ` Jeff King [this message]
2018-04-06 15:55           ` Olaf Hering
2018-04-06 16:15             ` Jeff King
2018-04-06 16:57             ` Rafael Ascensao
2018-04-06 17:50               ` Jeff King
2018-04-05 10:24 ` How to configure sendemail for no-auth? astian
2018-04-05 10:27 ` astian

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=20180405163227.GA25224@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).