threads / discuss / 46225

Does 'git config' accept the '--remove' option?

Subject: Does 'git config' accept the '--remove' option?

## tl;dr

3 messages between Jun 21, 2017 and Jun 21, 2017.

replies: 2people: 2as markdown or json

Kaartic Sivaraam· Jun 21, 2017, 18:12 UTC · lore
Hello all,	

I recently noticed that when I run 'git config' with the '--remove <non_existing_section>' I get a warning that section doesn't exist. When I scrolled through the man page of git-config I could see any mention about the '--remove' option. I only see that there is a ' --remove-section' option. Sample output,

> $ git config --remove test
> fatal: No such section!
> $ git config --remove-section test
> fatal: No such section!
Is this a bug (or) is the documentation stale ?
-- 

Regards, Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>

Junio C Hamano· Jun 21, 2017, 18:34 UTC · re: Kaartic Sivaraam · lore

Re: Does 'git config' accept the '--remove' option?

Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> writes:
Show 12 quoted lines
> I recently noticed that when I run 'git config' with the '--remove
> <non_existing_section>' I get a warning that section doesn't exist.
> When I scrolled through the man page of git-config I could see any
> mention about the '--remove' option. I only see that there is a '
> --remove-section' option. Sample output,
>
>> $ git config --remove test
>> fatal: No such section!
>> $ git config --remove-section test
>> fatal: No such section!
>
> Is this a bug (or) is the documentation stale ?

Neither, I would say. I think that you would get exactly the same behaviour from

    $ git config --remo test
    $ git config --remove-sec test

These are merely "unique prefix can be abbreviated in option names" kicking in, I think.

    
Kaartic Sivaraam· Jun 21, 2017, 18:43 UTC · re: Junio C Hamano · lore

Re: Does 'git config' accept the '--remove' option?

On Wed, 2017-06-21 at 11:34 -0700, Junio C Hamano wrote:
Show 9 quoted lines
> Neither, I would say.  I think that you would get exactly the same
> behaviour from 
> 
>     $ git config --remo test
>     $ git config --remove-sec test
> 
> These are merely "unique prefix can be abbreviated in option names"
> kicking in, I think.
> 
Interesting. This is the first time I'm hearing this.

← back to recent threads