Skip to content

Commit

Permalink
test: fix t7001 cp to use POSIX options
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
mackyle authored and gitster committed Apr 11, 2014
1 parent 7bbc4e8 commit 00764ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/t7001-mv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm
(
cd sub &&
rm -f .git &&
cp -a ../.git/modules/sub .git &&
cp -R -P -p ../.git/modules/sub .git &&
GIT_WORK_TREE=. git config --unset core.worktree
) &&
mkdir mod &&
Expand All @@ -330,7 +330,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu
(
cd sub &&
rm -f .git &&
cp -a ../.git/modules/sub .git &&
cp -R -P -p ../.git/modules/sub .git &&
GIT_WORK_TREE=. git config --unset core.worktree
) &&
mkdir mod &&
Expand Down

0 comments on commit 00764ca

Please sign in to comment.