git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git config -> "fatal: bad config file"

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Aug 14, 2009, 14:18 UTC
Message-ID
<4A85724C.5060406@drmicha.warpmail.net>
In-Reply-To
<A5CDBB91-E889-4849-953A-2C1DB4A04513@gmail.com>
David Reitter venit, vidit, dixit 14.08.2009 15:38:
Show 14 quoted lines
> I made a mistake editing my config file using "git config -e".  This  
> caused git commands to fail.
> 
> Trying to fix the problem, I did
> 
> git config -e
> fatal: bad config file line 7 in .git/config
> 
> I think the refusal to edit a broken config file is not a good idea.   
> It's easy to fix for me of course by editing .git/config directly, but  
> git-config should probably not read the config file at all.
> 
> Thanks for your consideration.
> 

git needs to read the file because the editor could be configured there! The only option would be to make git config -e continue past that error.

Michael
Previous: David ReitterNext: David Reitter
Message 2 of 14 in “git config -> "fatal: bad config file"”
  1. David ReitterAug 14, 2009
  2. Michael J GruberAug 14, 2009
  3. David ReitterAug 14, 2009
  4. Jakub NarebskiAug 14, 2009
  5. git-config: Parse config files lenientlyMichael J Gruber, Aug 14, 2009
  6. Junio C HamanoAug 14, 2009
  7. Michael J GruberAug 17, 2009
  8. Junio C HamanoAug 17, 2009
  9. [PATCHv2] git-config: Parse config files lenientlyMichael J Gruber, Sep 2, 2009
  10. Junio C HamanoSep 3, 2009
  11. Michael J GruberSep 3, 2009
  12. Junio C HamanoSep 3, 2009
  13. Michael J GruberSep 4, 2009
  14. Junio C HamanoSep 4, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.