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

Re: [PATCH] Add test case for git-config-set

From
Junio C Hamano <junkio@cox.net>
Date
Nov 18, 2005, 06:32 UTC
Message-ID
<7vsltuo49q.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vd5kypjv2.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
> 	git-config-set section.key
>
> confusingly enough is --unset (we probably would want to require
> an explicit command line noise-word "--unset" in this case).

This is too confusing, so I think we should require --unset. I think the C-interface I suggested in the previous message can stay the same, but from the command line perspective, we should have a bit easier syntax.

A revised suggestion is:
	;# remove all
	git-config-set --unset section.key
	;# remove values that match rx and then append zero or more values
	git-config-set --remove rx section.key [value...]
	;# append one or more values (equivalent to specifying --remove
        ;# with rx that never matches anything).  To reduce
        ;# confusion, we always require at least one value here.
	git-config-set section.key value [value...]
	;# Additionally, purely as a syntax sugar, replace the
	;# entire multivalue with one or more values
	;# (equivalent to saying --remove '^').
	git-config-set --replace section.key value [value...]

I think (aside from "*-set" now becomes confusing), showing the value of the specified key to stdout with

	git-config-set section.key

would be a nice addition to complete the suite; has anybody noticed that git-var is cumbersome to use for this?

Previous: Junio C HamanoNext: Johannes Schindelin
Message 3 of 5 in “Add test case for git-config-set”
  1. Add test case for git-config-setJohannes Schindelin, Nov 17, 2005
  2. Junio C HamanoNov 18, 2005
  3. Junio C HamanoNov 18, 2005
  4. Johannes SchindelinNov 18, 2005
  5. Johannes SchindelinNov 18, 2005

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.