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?