# Bug? git config and --unset are not inverses

3 messages from 2015-07-29 to 2015-07-29. Participants: Dave Borowitz, Junio C Hamano.
Thread: https://gitlist.dev/t/39966

## Dave Borowitz, 2015-07-29 18:59

Subject: Bug? git config and --unset are not inverses
Message-ID: <CAD0k6qR0J0ks2mL9TTd4wD7qrzKwadFGC=ecJRCsTcSS0ioo_A@mail.gmail.com>
URL: https://gitlist.dev/e/CAD0k6qR0J0ks2mL9TTd4wD7qrzKwadFGC%3DecJRCsTcSS0ioo_A%40mail.gmail.com

```
It looks like git config --unset may leave an orphaned section, but a
subsequent set adds a new section:

$ git config --file=myconfig section.foo true
$ git config --file=myconfig --unset section.foo
$ cat myconfig
[section]
$ git config --file=myconfig section.foo true
$ cat myconfig
[section]
[section]
       foo = true
$ git --version
git version 2.5.0.rc2.392.g76e840b

```

## Junio C Hamano, 2015-07-29 19:02

Subject: Re: Bug? git config and --unset are not inverses
Message-ID: <xmqqpp3a948q.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqqpp3a948q.fsf%40gitster.dls.corp.google.com
In-Reply-To: <CAD0k6qR0J0ks2mL9TTd4wD7qrzKwadFGC=ecJRCsTcSS0ioo_A@mail.gmail.com>

```
Dave Borowitz <dborowitz@google.com> writes:

> It looks like git config --unset may leave an orphaned section, but a
> subsequent set adds a new section:

Old news known for at least several years.  Patches welcome ;-)

```

## Junio C Hamano, 2015-07-29 19:10

Subject: Re: Bug? git config and --unset are not inverses
Message-ID: <xmqqlhdy93vp.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqqlhdy93vp.fsf%40gitster.dls.corp.google.com
In-Reply-To: <CAD0k6qR0J0ks2mL9TTd4wD7qrzKwadFGC=ecJRCsTcSS0ioo_A@mail.gmail.com>

```
The most recent round of the discussion is here:

  http://thread.gmane.org/gmane.comp.version-control.git/219505/focus=219524

```
