aboutsummaryrefslogtreecommitdiff
path: root/worktree.c
diff options
context:
space:
mode:
Diffstat (limited to 'worktree.c')
-rw-r--r--worktree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/worktree.c b/worktree.c
index 344ad0c031..1ed5e8c3cd 100644
--- a/worktree.c
+++ b/worktree.c
@@ -227,7 +227,7 @@ struct worktree **get_worktrees_without_reading_head(void)
char *get_worktree_git_dir(const struct worktree *wt)
{
if (!wt)
- return xstrdup(repo_get_git_dir(the_repository));
+ BUG("%s() called with NULL worktree", __func__);
else if (!wt->id)
return xstrdup(repo_get_common_dir(wt->repo));
else