Skip to content

Commit 00764ca

Browse files
mackylegitster
authored andcommitted
test: fix t7001 cp to use POSIX options
Since 1150246 and 04c1ee5 (both first appearing in v1.8.5), the t7001-mv test has used "cp -a" to perform a copy in several of the tests. However, the "-a" option is not required for a POSIX cp utility and some platforms' cp utilities do not support it. The POSIX equivalent of -a is -R -P -p. Change "cp -a" to "cp -R -P -p" so that the t7001-mv test works on systems with a cp utility that only implements the POSIX required set of options and not the "-a" option. Signed-off-by: Kyle J. McKay <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7bbc4e8 commit 00764ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t7001-mv.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm
307307
(
308308
cd sub &&
309309
rm -f .git &&
310-
cp -a ../.git/modules/sub .git &&
310+
cp -R -P -p ../.git/modules/sub .git &&
311311
GIT_WORK_TREE=. git config --unset core.worktree
312312
) &&
313313
mkdir mod &&
@@ -330,7 +330,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu
330330
(
331331
cd sub &&
332332
rm -f .git &&
333-
cp -a ../.git/modules/sub .git &&
333+
cp -R -P -p ../.git/modules/sub .git &&
334334
GIT_WORK_TREE=. git config --unset core.worktree
335335
) &&
336336
mkdir mod &&

0 commit comments

Comments
 (0)