Skip to content

Commit 1abdb9c

Browse files
committed
Avoid cp -v in fixtures for portability
This change removes the `-v` option from the one `cp` invocation in `test/fixtures/many.sh`, the one fixture script that uses it. This is roughly analogous to the preceding removal of `-v` from the one `mv` invocation that used that. But while `rm -v` is standardized but only recently, `cp -v` is not standard. Even POSIX 1003.1-2024 does not require `cp` to recognize `-v`: - https://pubs.opengroup.org/onlinepubs/9799919799/utilities/cp.html See the preceding commit for general considerations, advantages and disadvantages, and alterntive approaches. As there, this currently just drops the `-v` without replacing it with anything, based on the idea that printing the list of files being operated on (here, copied) may not be important. - That assumption may be less well-founded here, since the affected command, introduced in 482d6f3 (GitoxideLabs#1285), does *not* have other nearby `cp` commands that are conceptually related but omit `-v`. - But, unlike there, it may be reasonable to consider the `-v` here to be a (minor) bug, since it is not standardized but it appears in test fixture code that seems intended to run all targets.
1 parent 515eb76 commit 1abdb9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gix-dir/tests/fixtures/many.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ git init expendable-and-precious-nested-in-ignored-dir
280280
echo 'ignored/' > .gitignore
281281
git add .gitignore && git commit -m "init"
282282
mkdir -p ignored/other
283-
cp -Rv ../expendable-and-precious ignored/d
283+
cp -R ../expendable-and-precious ignored/d
284284
rm -Rf ignored/d/*-by-filematch ignored/d/some-*
285285
mkdir -p other/ignored && >other/ignored/a
286286
)

0 commit comments

Comments
 (0)