aboutsummaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-05-12 23:29:18 -0400
committerJunio C Hamano <gitster@pobox.com>2017-05-15 11:30:00 +0900
commit588a538ae554f61a37d43c972da75d0f7c3ed484 (patch)
tree97c3c46b9d2b8468faa7d134c9757b8c520087c8 /environment.c
parentd8193743e0883e7331c102a4d04cee5324eb3b5f (diff)
downloadgit-588a538ae554f61a37d43c972da75d0f7c3ed484.tar.gz
git-588a538ae554f61a37d43c972da75d0f7c3ed484.tar.xz
setup_git_env: convert die("BUG") to BUG()
Converting to BUG() makes it easier to detect and debug cases where we hit this assertion. Coupled with a new test in t1300, this shows that the test suite can detect such corner cases. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/environment.c b/environment.c
index ff6e4f06e..1f0bda5af 100644
--- a/environment.c
+++ b/environment.c
@@ -169,7 +169,7 @@ static void setup_git_env(void)
git_dir = getenv(GIT_DIR_ENVIRONMENT);
if (!git_dir) {
if (!startup_info->have_repository)
- die("BUG: setup_git_env called without repository");
+ BUG("setup_git_env called without repository");
git_dir = DEFAULT_GIT_DIR_ENVIRONMENT;
}
gitfile = read_gitfile(git_dir);