Skip to contentSkip to conversation

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

DISCUSSION Kaartic Sivaraam 2 participants 3 messages Jun 21, 2017

lore
Share & tools
lore
#0 lore raw

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,

Quoted 4 lines
$ 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 <[email protected]>

#1 lore raw
Quoted 6 lines · Kaartic Sivaraam

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,

Quoted 6 lines
Quoted 4 lines
$ 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.

#2 lore raw
Quoted 9 lines · Junio C Hamano

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.