Skip to content

Commit 8f1efc3

Browse files
committed
t2400: prefix bare-repo git worktree add with inline GIT_DIR=.
To prepare for `safe.bareRepository` defaulting to `explicit` (see 8d1a744), prefix bare-repo `git worktree add` invocations with an inline `GIT_DIR=.` so Git does not rely on implicit bare repository discovery. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent a712f06 commit 8f1efc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t2400-worktree-add.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ test_expect_success '"add" from a bare repo' '
174174
(
175175
git clone --bare . bare &&
176176
cd bare &&
177-
git worktree add -b bare-main ../there2 main
177+
GIT_DIR=. git worktree add -b bare-main ../there2 main
178178
)
179179
'
180180

@@ -189,7 +189,7 @@ test_expect_success '"add" default branch of a bare repo' '
189189
(
190190
git clone --bare . bare2 &&
191191
cd bare2 &&
192-
git worktree add ../there3 main &&
192+
GIT_DIR=. git worktree add ../there3 main &&
193193
cd ../there3 &&
194194
# Simple check that a Git command does not
195195
# immediately fail with the current setup

0 commit comments

Comments
 (0)