]> git.ipfire.org Git - thirdparty/git.git/commit
config: complain about --worktree outside of a git repo
authorMatheus Tavares <matheus.bernardino@usp.br>
Wed, 9 Sep 2020 13:16:08 +0000 (10:16 -0300)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Sep 2020 19:47:47 +0000 (12:47 -0700)
commit378fe5fc3d5e415b2d7062e29bc99029dc3418d5
tree5cb7f4d175af6aed63dec9cbde3e45deb2261317
parent47ae905ffb98cc4d4fd90083da6bc8dab55d9ecc
config: complain about --worktree outside of a git repo

Running `git config --worktree` outside of a git repository hits a BUG()
when trying to enumerate the worktrees. Let's catch this error earlier
and die() with a friendlier message.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/config.c
t/t1300-config.sh