Bug 452397

Summary: git config creates duplicate sections in .git/config
Product: [Fedora] Fedora Reporter: Hans Ulrich Niedermann <rhbugs>
Component: gitAssignee: Chris Wright <chrisw>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: bkearney, jwboyer, tmz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-19 11:31:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hans Ulrich Niedermann 2008-06-22 03:01:00 UTC
Description of problem:

  A sequence of
     git config x.y v1
     git config --unset x.y
     git config x.y v2
  leaves two [x] sections in .git/config.

Version-Release number of selected component (if applicable):

  git-1.5.5.1-1.fc9.i386

How reproducible:

  100%

Steps to Reproduce:
   mkdir test.git
   cd test.git
   git init
   sed -n '/m4rker/,$p' .git/config
   git config m4rker.foo v1
   sed -n '/m4rker/,$p' .git/config
   git config --unset m4rker.foo
   sed -n '/m4rker/,$p' .git/config
   git config m4rker.foo v2
   sed -n '/m4rker/,$p' .git/config
  
Actual results:

   [m4rker]
   [m4rker]
           foo = v2

Expected results:

   [m4rker]
           foo = v2

Additional info:

Comment 1 Todd Zullinger 2009-01-12 03:23:17 UTC
I don't know that upstream guarantees that "git config" will create pretty config files.  Do the extra markers actually cause harm or are they just unsightly?

Comment 2 Todd Zullinger 2009-02-19 04:39:03 UTC
Hans, can you confirm whether you've found any problem caused by the extra markers in the config file, other than their redundancy?  If not, I'd be inclined to close this as NOTABUG.

Comment 3 Hans Ulrich Niedermann 2009-02-19 11:31:08 UTC
Only wetware problems when editing .git/config.

Closing as NOTABUG, then.