Skip to content

Commit a54a7d7

Browse files
committed
t2406: wrap bare repo commands in subshell with GIT_DIR
To prepare for `safe.bareRepository` defaulting to `explicit` (see 8d1a744), 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 <johannes.schindelin@gmx.de>
1 parent 70bd3e3 commit a54a7d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t2406-worktree-repair.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ test_expect_success 'repair .git file from bare.git' '
8484
git -C bare.git worktree add --detach ../corrupt &&
8585
git -C corrupt rev-parse --absolute-git-dir >expect &&
8686
rm -f corrupt/.git &&
87-
git -C bare.git worktree repair &&
87+
git -C bare.git --git-dir=. worktree repair &&
8888
git -C corrupt rev-parse --absolute-git-dir >actual &&
8989
test_cmp expect actual
9090
'

0 commit comments

Comments
 (0)