What git config --replace-all ONE_ARG should do?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

What git config --replace-all ONE_ARG should do?

From: Carlos Rica <hidden>
Date: 2016-06-15 22:44:26

The command 'git config --replace-all ONE_ARG' currently
tries to do the same as the command 'git config NAME VALUE',
using --replace-all as the NAME and ONE_ARG as VALUE,
printing "key does not contain a section: --replace-all".

What this command should do? I'm almost finnishing
buitin-config.c to use parse-options and I need to know
if that command should do something or just showing
the help and exit in such case.

I think that --replace-all should always receive at least
two arguments. The documentation currently says:
git-config ... --replace-all name [value [value_regex]]
and current tests are only cheking two arguments.

Since I cannot imagine a consistent action to do
when only the name is given and nobody complains
I will do this to print the help message and exit.

Cheers

--
Carlos

Re: What git config --replace-all ONE_ARG should do?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:26

"Carlos Rica" [off-list ref] writes:
The command 'git config --replace-all ONE_ARG' currently
tries to do the same as the command 'git config NAME VALUE',
using --replace-all as the NAME and ONE_ARG as VALUE,
printing "key does not contain a section: --replace-all".
That sounds silly, and I think it is an improvement to error out in such a
case.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help