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

Re: General support for ! in git-config values

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 1, 2012, 22:21 UTC
Message-ID
<7v62fq2o03.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CACBZZX5mX55Rh8b2GYv7wKbCCypCkrn5AiM9BpXydgcYxHWdQA@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 6 quoted lines
>> I.e., everything pertaining to "!" happens after we get the config
>> string. So what is it that you want "git config --with-exec" to do?
>
> I agree that that's how it should work, I just suggested --with-exec
> in case anyone complained about the backwards compatibility issue of
> changing the meaning of "!" for existing configs.
Now you made me utterly confused.

What "backwards compatibility" issue do you have in mind? If I name myself '!me' with "user.name = !me", do I suddenly break backwards compatibility of Git with previous versions somehow? If so how?

The --with-exec option you talk about seems to me the option about the backward compatibility of the _calling script_ of "git config". The old version of git-blorl script may have used foo.bar as a mere string, but a new version of it may (optionally) interpret foo.bar's value in a special way when it begins with a "!", introducing a backward compatibility issues to git-blorl script, and users who want to take advantage of that feature may want to run it as "git-blorl --with-exec", and the relevant part of the "git-blorl" script might look like this:

	foo_bar=$(git config foo.bar)
        case "$with_exec,$foo_bar" in
        yes,\!*)
        	foo_bar=$(eval ${foo_bar#\!}) ;;
	esac
        ... then do something interesting using $foo_bar ...
Previous: Ævar Arnfjörð BjarmasonNext: demerphq
Message 4 of 20 in “General support for ! in git-config values”
  1. Ævar Arnfjörð BjarmasonFeb 1, 2012
  2. Jeff KingFeb 1, 2012
  3. Ævar Arnfjörð BjarmasonFeb 1, 2012
  4. Junio C HamanoFeb 1, 2012
  5. demerphqFeb 2, 2012
  6. Junio C HamanoFeb 2, 2012
  7. demerphqFeb 2, 2012
  8. Junio C HamanoFeb 2, 2012
  9. demerphqFeb 2, 2012
  10. Jeff KingFeb 2, 2012
  11. demerphqFeb 2, 2012
  12. Jeff KingFeb 2, 2012
  13. demerphqFeb 2, 2012
  14. Kyle MoffettFeb 3, 2012
  15. Junio C HamanoFeb 3, 2012
  16. Kyle MoffettFeb 3, 2012
  17. Jeff KingFeb 3, 2012
  18. Jeff KingFeb 3, 2012
  19. Junio C HamanoFeb 2, 2012
  20. demerphqFeb 2, 2012

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.