public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* bogus config file vs. 'git config --edit'
@ 2019-12-27 11:04 SZEDER Gábor
  2020-01-08 11:57 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: SZEDER Gábor @ 2019-12-27 11:04 UTC (permalink / raw)
  To: git

Let's suppose I somehow ended up with a bogus config file:

  $ tail -n2 .git/config 
  [section]
          foo bar baz

and now I try to rectify the situation, but I know that poking around
in the .git directory is a no-no, so instead of 'vim .git/config' I
try:

  $ git config --edit
  fatal: bad config line 81 in file .git/config

Uh-oh.

Furthermore, if I don't remember quite clearly the finer points of the
syntax of the config file, then I might want to look it up:

  $ git help config
  fatal: bad config line 81 in file .git/config

I think bith 'git config --edit' and 'git help ...' should just work,
no matter what nonsense might be in the config file, even if they then
launch a different editor or pager than what are set in the
configuration.


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

end of thread, other threads:[~2020-01-08 11:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-27 11:04 bogus config file vs. 'git config --edit' SZEDER Gábor
2020-01-08 11:57 ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox