Skip to content

Commit 8ff0c78

Browse files
committed
Prevent unintended expansions in make_submodules fixture script
This quotes the command substitution so that if the current working directory path contains IFS whitespace such as spaces, or contains globbing characters, these will be treated literally, rather than triggering word splitting or pathname expansion. (Much less importantly, this also changes it to use the $() syntax for command substitution. This is separate from quoting, since both syntaxes need to be double-quoted to avoid splitting and globbing.)
1 parent 52f54f2 commit 8ff0c78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gix/tests/fixtures/make_submodules.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ mkdir symlinked-git-dir
160160
git commit -q --allow-empty -m "init"
161161
)
162162

163-
git config -f r1/.git/config core.worktree `pwd`
163+
git config -f r1/.git/config core.worktree "$(pwd)"
164164
ln -s r1/.git .git
165165

166166
git -c protocol.file.allow=always submodule add ../module1 m1

0 commit comments

Comments
 (0)