Skip to content

Commit 37732fb

Browse files
authored
Merge pull request #1334 from EliahKagan/nonstandard-worktree
Let nonstandard worktree fixtures work even if Git < 2.37.2
2 parents 4bb8ef5 + 01d6be9 commit 37732fb

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

gix-dir/tests/fixtures/many.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,24 +110,22 @@ git clone dir-with-tracked-file with-submodule
110110
git init nonstandard-worktree
111111
(cd nonstandard-worktree
112112
mkdir dir-with-dot-git
113-
mv .git dir-with-dot-git
114-
115-
git -C dir-with-dot-git config core.worktree "$PWD"
116113
touch dir-with-dot-git/inside
117114
touch seemingly-outside
118-
git -C dir-with-dot-git add inside ../seemingly-outside
115+
git add dir-with-dot-git/inside seemingly-outside
116+
mv .git dir-with-dot-git
117+
git -C dir-with-dot-git config core.worktree "$PWD"
119118
git -C dir-with-dot-git commit -m "init"
120119
)
121120

122121
git init nonstandard-worktree-untracked
123122
(cd nonstandard-worktree-untracked
124123
mkdir dir-with-dot-git
125-
mv .git dir-with-dot-git
126-
127-
git -C dir-with-dot-git config core.worktree "$PWD"
128124
touch dir-with-dot-git/inside
129125
touch seemingly-outside
130-
git -C dir-with-dot-git add inside ../seemingly-outside
126+
git add dir-with-dot-git/inside seemingly-outside
127+
mv .git dir-with-dot-git
128+
git -C dir-with-dot-git config core.worktree "$PWD"
131129
git -C dir-with-dot-git commit -m "init"
132130

133131
rm dir-with-dot-git/.git/index

0 commit comments

Comments
 (0)