git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] git config: cygwin git version 1.6.1.2 does not deletes empty  sections
@ 2009-05-06 15:50 Constantine Plotnikov
  2009-05-06 16:04 ` Constantine Plotnikov
  0 siblings, 1 reply; 4+ messages in thread
From: Constantine Plotnikov @ 2009-05-06 15:50 UTC (permalink / raw)
  To: git

I have encountered a bug related to git config in cygwin git version 1.6.1.2

The git config --unset might leave an empty section when the last
property is deleted. But consequent "git config key value" does not
uses this empty section. So the following script leaves a sequence of
empty sections "[a]". Looks like a disk space leak to me.

git config a.b a
git config --unset a.b
git config a.b a
git config --unset a.b
git config a.b a
git config --unset a.b
git config a.b a
git config --unset a.b

The resulting .git/config file:

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	ignorecase = true
[a]
[a]
[a]
[a]

Was this bug fixed in later versions?

Constantine

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] git config: cygwin git version 1.6.1.2 does not deletes  empty sections
  2009-05-06 15:50 [BUG] git config: cygwin git version 1.6.1.2 does not deletes empty sections Constantine Plotnikov
@ 2009-05-06 16:04 ` Constantine Plotnikov
  2009-05-06 18:08   ` Erik Faye-Lund
  0 siblings, 1 reply; 4+ messages in thread
From: Constantine Plotnikov @ 2009-05-06 16:04 UTC (permalink / raw)
  To: git

The bug is also confirmed on MSYS git version 1.6.2.2.1669.g7eaf8.

Constantine

On Wed, May 6, 2009 at 7:50 PM, Constantine Plotnikov
<constantine.plotnikov@gmail.com> wrote:
> I have encountered a bug related to git config in cygwin git version 1.6.1.2
>
> The git config --unset might leave an empty section when the last
> property is deleted. But consequent "git config key value" does not
> uses this empty section. So the following script leaves a sequence of
> empty sections "[a]". Looks like a disk space leak to me.
>
> git config a.b a
> git config --unset a.b
> git config a.b a
> git config --unset a.b
> git config a.b a
> git config --unset a.b
> git config a.b a
> git config --unset a.b
>
> The resulting .git/config file:
>
> [core]
>        repositoryformatversion = 0
>        filemode = true
>        bare = false
>        logallrefupdates = true
>        ignorecase = true
> [a]
> [a]
> [a]
> [a]
>
> Was this bug fixed in later versions?
>
> Constantine
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] git config: cygwin git version 1.6.1.2 does not deletes  empty sections
  2009-05-06 16:04 ` Constantine Plotnikov
@ 2009-05-06 18:08   ` Erik Faye-Lund
  2009-05-06 20:43     ` Michał Kiedrowicz
  0 siblings, 1 reply; 4+ messages in thread
From: Erik Faye-Lund @ 2009-05-06 18:08 UTC (permalink / raw)
  To: Constantine Plotnikov; +Cc: git

On Wed, May 6, 2009 at 6:04 PM, Constantine Plotnikov
<constantine.plotnikov@gmail.com> wrote:
> The bug is also confirmed on MSYS git version 1.6.2.2.1669.g7eaf8.

The same issue is present in git 1.6.2.1 on Linux. Not that I'm too
sure it's really a bug, though ;)

-- 
Erik "kusma" Faye-Lund
kusmabite@gmail.com
(+47) 986 59 656

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] git config: cygwin git version 1.6.1.2 does not deletes  empty sections
  2009-05-06 18:08   ` Erik Faye-Lund
@ 2009-05-06 20:43     ` Michał Kiedrowicz
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Kiedrowicz @ 2009-05-06 20:43 UTC (permalink / raw)
  To: Erik Faye-Lund; +Cc: git

Erik Faye-Lund <kusmabite@googlemail.com> wrote:

> On Wed, May 6, 2009 at 6:04 PM, Constantine Plotnikov
> <constantine.plotnikov@gmail.com> wrote:
> > The bug is also confirmed on MSYS git version 1.6.2.2.1669.g7eaf8.
> 
> The same issue is present in git 1.6.2.1 on Linux. Not that I'm too
> sure it's really a bug, though ;)
> 

Happens also in master (v1.6.3-rc4-29-g8146f19). IMO this is because
git_parse_file() reports only *variables*, not *sections* and
store_aux() doesn't find empty section.

--
Michał Kiedrowicz

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-06 20:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-06 15:50 [BUG] git config: cygwin git version 1.6.1.2 does not deletes empty sections Constantine Plotnikov
2009-05-06 16:04 ` Constantine Plotnikov
2009-05-06 18:08   ` Erik Faye-Lund
2009-05-06 20:43     ` Michał Kiedrowicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).