From f71488534d5a0c0d56bc033a6fe617be610e8ded Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 2 Apr 2026 14:33:14 +0000 Subject: [PATCH] t2406: use `--git-dir=.` for bare repository worktree repair To prepare for `safe.bareRepository` defaulting to `explicit` (see 8d1a7448206e), the test case t2406.10(repair .git file from bare.git) cannot rely on the implicit discovery of thee bare repository. Simply add a `--git-dir=.` to the invocation. The `-C bare.git` argument is still needed so that the `repair` command realizes works on the intended directory. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t2406-worktree-repair.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t2406-worktree-repair.sh b/t/t2406-worktree-repair.sh index f5f19b3169..cac448b575 100755 --- a/t/t2406-worktree-repair.sh +++ b/t/t2406-worktree-repair.sh @@ -84,7 +84,7 @@ test_expect_success 'repair .git file from bare.git' ' git -C bare.git worktree add --detach ../corrupt && git -C corrupt rev-parse --absolute-git-dir >expect && rm -f corrupt/.git && - git -C bare.git worktree repair && + git -C bare.git --git-dir=. worktree repair && git -C corrupt rev-parse --absolute-git-dir >actual && test_cmp expect actual '