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

Re: Disabling credential helper?

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 4, 2014, 06:07 UTC
Message-ID
<xmqq7fy8uev9.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20141204013306.GA9406@peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
>   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.

Show 6 quoted lines
>      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).

Show 5 quoted lines
>      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.

Previous: Jeff KingNext: Junio C Hamano
Message 7 of 17 in “Disabling credential helper?”
  1. brian m. carlsonDec 3, 2014
  2. Jonathan NiederDec 3, 2014
  3. Jeff KingDec 3, 2014
  4. Jonathan NiederDec 3, 2014
  5. Jeff KingDec 3, 2014
  6. Jeff KingDec 4, 2014
  7. Junio C HamanoDec 4, 2014
  8. Junio C HamanoDec 3, 2014
  9. brian m. carlsonDec 4, 2014
  10. 0/2 disabling terminal promptsJeff King, Dec 4, 2014
  11. 1/2 credential: let helpers tell us to quitJeff King, Dec 4, 2014
  12. 2/2 prompt: respect GIT_TERMINAL_PROMPT to disable terminal promptsJeff King, Dec 4, 2014
  13. Junio C HamanoDec 4, 2014
  14. Jeff KingDec 4, 2014
  15. Junio C HamanoDec 4, 2014
  16. Jeff KingDec 5, 2014
  17. Junio C HamanoDec 5, 2014

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.