From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
"brian m. carlson" <sandals@crustytoothpaste.net>,
git@vger.kernel.org
Subject: Re: Disabling credential helper?
Date: Wed, 03 Dec 2014 22:07:54 -0800 [thread overview]
Message-ID: <xmqq7fy8uev9.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20141204013306.GA9406@peff.net> (Jeff King's message of "Wed, 3 Dec 2014 20:33:06 -0500")
Jeff King <peff@peff.net> writes:
> 1. I chose the value-less boolean as a token to reset the list (since
> it is otherwise an unmeaningful error). The example above shows its
> use with "-c", but you could also do:
>
> [credential]
> helper
> helper = foo
>
> in a config file itself. This is probably rather unintuitive.
For this one, and I suspect all the "multi-valued" ones, I think it
actually is the most sensible syntax (another possiblity is to give
an empty string, assuming that all multi-valued variables we care
about take non-empty string or numeric values), as I do not see a
useful/valid use case for wanting to define boolean multi-valued
variable.
> If we can accept stomping on an unlikely-used token, something
> like:
>
> git -c credential.helper=RESET fetch ...
>
> is more sensible (and we can argue about the exact token used).
This unfortunately is unlikely to fly well if we are shooting for a
generic mechanism that is applicable for multi-valued ones in
general (your comment 2. below is very much relevant and true).
> If we can accept new syntax and new config code, something like:
>
> git -c '!credential.helper' fetch ...
>
> is probably workable.
I think I suggested exactly this syntax (and "[credential] !helper"
in the config file) when this was brought up the last time, but it
was shot down because that would make the resulting configuration
file unparsable (not just ignored) by existing versions of Git.
But perhaps it is a good thing to break existing parser when "clear
the variable settings seen so far" is used. It would not do us very
good to allow existing implementations to ignore it and continue as
if all other entries (and special token like RESET) matter will
silently give users incorrect result.
next prev parent reply other threads:[~2014-12-04 6:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 0:03 Disabling credential helper? brian m. carlson
2014-12-03 0:59 ` Jonathan Nieder
2014-12-03 1:21 ` Jeff King
2014-12-03 1:29 ` Jonathan Nieder
2014-12-03 1:36 ` Jeff King
2014-12-04 1:33 ` Jeff King
2014-12-04 6:07 ` Junio C Hamano [this message]
2014-12-03 17:14 ` Junio C Hamano
2014-12-04 0:42 ` brian m. carlson
2014-12-04 3:42 ` [PATCH 0/2] disabling terminal prompts Jeff King
2014-12-04 3:46 ` [PATCH 1/2] credential: let helpers tell us to quit Jeff King
2014-12-04 3:52 ` [PATCH 2/2] prompt: respect GIT_TERMINAL_PROMPT to disable terminal prompts Jeff King
2014-12-04 18:24 ` Junio C Hamano
2014-12-04 21:01 ` Jeff King
2014-12-04 21:33 ` Junio C Hamano
2014-12-05 9:10 ` Jeff King
2014-12-05 17:37 ` Junio C Hamano
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=xmqq7fy8uev9.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
--cc=sandals@crustytoothpaste.net \
/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.