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

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

From
David Reitter <david.reitter@gmail.com>
Date
Aug 14, 2009, 14:26 UTC
Message-ID
<2D345CF1-9534-46F2-B0DF-ADA4EFDB5A51@gmail.com>
In-Reply-To
<4A85724C.5060406@drmicha.warpmail.net>
On Aug 14, 2009, at 10:18 AM, Michael J Gruber wrote:
> 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.

Syntax errors in .git/config could lead to warnings. Since the file is primarily line-oriented anyways (except for groups), recovery should be easy.

Also, you could have git-config -e edit a temporary file, check the file for errors after editing and then move it to .git/config.

Previous: Michael J GruberNext: Jakub Narebski
Message 3 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.