git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How to undo previously set configuration?

From
Jeff King <peff@peff.net>
Date
Apr 5, 2018, 16:32 UTC
Message-ID
<20180405163227.GA25224@sigill.intra.peff.net>
In-Reply-To
<20180405152525.13d1c776.olaf@aepfle.de>
On Thu, Apr 05, 2018 at 03:25:25PM +0200, Olaf Hering wrote:
Show 13 quoted lines
> 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
Previous: Olaf HeringNext: Olaf Hering
Message 7 of 13 in “How to configure sendemail for no-auth?”
  1. Olaf HeringApr 5, 2018
  2. How to undo previously set configuration?Ævar Arnfjörð Bjarmason, Apr 5, 2018
  3. Olaf HeringApr 5, 2018
  4. Ævar Arnfjörð BjarmasonApr 5, 2018
  5. Randall S. BeckerApr 5, 2018
  6. Olaf HeringApr 5, 2018
  7. Jeff KingApr 5, 2018
  8. Olaf HeringApr 6, 2018
  9. Jeff KingApr 6, 2018
  10. Rafael AscensaoApr 6, 2018
  11. Jeff KingApr 6, 2018
  12. astianApr 5, 2018
  13. astianApr 5, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.