Skip to content

Commit

Permalink
Merge pull request GitoxideLabs#1334 from EliahKagan/nonstandard-work…
Browse files Browse the repository at this point in the history
…tree

Let nonstandard worktree fixtures work even if Git < 2.37.2
  • Loading branch information
Byron authored Apr 3, 2024
2 parents 4bb8ef5 + 01d6be9 commit 37732fb
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions gix-dir/tests/fixtures/many.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,24 +110,22 @@ git clone dir-with-tracked-file with-submodule
git init nonstandard-worktree
(cd nonstandard-worktree
mkdir dir-with-dot-git
mv .git dir-with-dot-git

git -C dir-with-dot-git config core.worktree "$PWD"
touch dir-with-dot-git/inside
touch seemingly-outside
git -C dir-with-dot-git add inside ../seemingly-outside
git add dir-with-dot-git/inside seemingly-outside
mv .git dir-with-dot-git
git -C dir-with-dot-git config core.worktree "$PWD"
git -C dir-with-dot-git commit -m "init"
)

git init nonstandard-worktree-untracked
(cd nonstandard-worktree-untracked
mkdir dir-with-dot-git
mv .git dir-with-dot-git

git -C dir-with-dot-git config core.worktree "$PWD"
touch dir-with-dot-git/inside
touch seemingly-outside
git -C dir-with-dot-git add inside ../seemingly-outside
git add dir-with-dot-git/inside seemingly-outside
mv .git dir-with-dot-git
git -C dir-with-dot-git config core.worktree "$PWD"
git -C dir-with-dot-git commit -m "init"

rm dir-with-dot-git/.git/index
Expand Down

0 comments on commit 37732fb

Please sign in to comment.