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

Re: Handling of 'git-config foo=bar'

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 4, 2007, 20:20 UTC
Message-ID
<eq5f34$ir9$1@sea.gmane.org>
In-Reply-To
<7vsldlr8wg.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 24 quoted lines
> Yann Dirson <ydirson@altern.org> writes:
> 
>> Currently, running "git-config foo=bar", ie. presumably an erroneous
>> attempt at setting "foo", indeed queries "foo=bar", so outputs nothing
>> and reports success.
>>
>> Do we want to allow "=" signs in config var names ?  It would seem
>> reasonable to refuse them, and report an error to the innocent user
>> (OK, i'm not that innocent, but still ;)
>>
>> Or does that sound a bad idea to anyone ?
> 
> Something like:
> 
>    git config remote.origin.fetch=refs/heads/master:refs/heads/origin
>    git config remote.origin.fetch+=refs/heads/next:refs/heads/next
>    git config remote.origin.fetch+=+refs/heads/pu:refs/heads/pu
>    git config remote.origin.fetch+=refs/heads/maint:refs/heads/maint
> 
> sounds sensible.
> 
> However, my feeling is "git repo-config" is primarily for use by
> scripts, and we are better off educating users not to be afraid
> of viewing and editing .git/config file themselves.

I think the question was not if we want new syntax for setting variables, but if we want to disallow '=' in variable (key) names. They are pretty restricted, and I cannot think offhand of variable name we would want that would need to have '=' in it...

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Junio C Hamano
Message 3 of 3 in “Handling of 'git-config foo=bar'”
  1. Yann DirsonFeb 4, 2007
  2. Junio C HamanoFeb 4, 2007
  3. Jakub NarebskiFeb 4, 2007

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.