git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bugreport: "git config --global" fails if an invalid .git file present
@ 2022-08-16 16:16 Jinwook Jeong
  2022-08-18  6:16 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Jinwook Jeong @ 2022-08-16 16:16 UTC (permalink / raw)
  To: git

What did you do before the bug happened? (Steps to reproduce your issue)

Executing `git config --global ...` and $PWD/.git exists as a file and
is invalid.

What did you expect to happen? (Expected behavior)

Git reads from or writes to the global config store.

What happened instead? (Actual behavior)

It prints:
  fatal: invalid gitfile format: $PWD/.git

What's different between what you expected and what actually happened?

Git fails to access the global config even if the current directory's
`.git` file has nothing to do with the global config.

[System Info]
git version:
git version 2.37.2
cpu: arm64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Darwin 21.6.0 Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:22
PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T6000 arm64
compiler info: clang: 13.1.6 (clang-1316.0.21.2.5)
libc info: no libc information available
$SHELL (typically, interactive shell): /opt/homebrew/bin/bash


[Enabled Hooks]
not run from a git repository - no hooks to show

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

end of thread, other threads:[~2022-08-24 11:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-16 16:16 bugreport: "git config --global" fails if an invalid .git file present Jinwook Jeong
2022-08-18  6:16 ` Jeff King
2022-08-18 16:28   ` Junio C Hamano
2022-08-24 11:34     ` Jinwook Jeong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).