git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Rafael Ascensao <rafa.almas@gmail.com>
Cc: "Olaf Hering" <olaf@aepfle.de>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: How to undo previously set configuration?
Date: Fri, 6 Apr 2018 13:50:44 -0400	[thread overview]
Message-ID: <20180406175044.GA32228@sigill.intra.peff.net> (raw)
In-Reply-To: <CACUQV5_E+MOHVD2rGjcQY=iK+tqB3wV9Lh1nwiEP+q+M-1iXzA@mail.gmail.com>

On Fri, Apr 06, 2018 at 05:57:39PM +0100, Rafael Ascensao wrote:

> On Fri, Apr 6, 2018 at 4:55 PM, Olaf Hering <olaf@aepfle.de> wrote:
> >
> > This does not work. Initially I copied the global config into the
> > repo and set all unwanted values to <empty>, like 'smtpuser='.
> > Perhaps the config parser recognized that fact, but the consumer
> > does not?
> >
> 
> Today someone asked on #git for a way to disable diff.external for a
> single command.
> Without thinking much I suggested $git -c diff.external= diff; which fails with:
> `fatal: cannot run : No such file or directory`
> 
> In this particular case there was `--no-ext-diff` to get around this
> and the case was promptly resolved.
> Just another another example where setting configuration values to
> "empty" doesn't translate to "disable this option".

Yeah, I think it would make sense in that case to reset
external_diff_cmd_cfg to NULL. I'd almost say that git_config_string()
should recognize and handle this case, but I suspect there are some
callers who need special behavior (e.g., to set it back to some
particular string).

-Peff

  reply	other threads:[~2018-04-06 17:50 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
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 [this message]
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180406175044.GA32228@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=rafa.almas@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).