Skip to content

Commit 92516cc

Browse files
committed
t5505: export GIT_DIR after git init --bare
To prepare for `safe.bareRepository` defaulting to `explicit` (see 8d1a744), export `GIT_DIR=.` right after `git init --bare &&` so subsequent commands access the bare repo explicitly. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 9320b4e commit 92516cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t5505-remote.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ test_expect_success 'add --mirror && prune' '
561561
mkdir mirror &&
562562
(
563563
cd mirror &&
564-
git init --bare &&
564+
git init --bare && GIT_DIR=. && export GIT_DIR &&
565565
git remote add --mirror -f origin ../one
566566
) &&
567567
(
@@ -583,7 +583,7 @@ test_expect_success 'add --mirror setting HEAD' '
583583
mkdir headmirror &&
584584
(
585585
cd headmirror &&
586-
git init --bare -b notmain &&
586+
git init --bare -b notmain && GIT_DIR=. && export GIT_DIR &&
587587
git remote add --mirror -f origin ../one &&
588588
test "$(git symbolic-ref HEAD)" = "refs/heads/main"
589589
)

0 commit comments

Comments
 (0)