bogus config file vs. 'git config --edit'
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Dec 27, 2019, 11:04 UTC
- Message-ID
- <20191227110431.GC32750@szeder.dev>
Let's suppose I somehow ended up with a bogus config file:
$ tail -n2 .git/config
[section]
foo bar bazand 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.