Skip to content

Commit dffb694

Browse files
committed
Avoid cp -v in fixtures for portability
This change removes the `-v` option from the one `cp` invocation in `gix-dir/tests/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, and both fixture scripts are heavily used due to being used in multiple tests and due to being intentionally re-run even when `GIX_TEST_IGNORE_ARCHIVES` is not set. 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. Taken together, this and the preceding commit allow 106 formerly failing tests to pass, on the OmniOS system I used for testing.
1 parent e961c13 commit dffb694

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gix-dir/tests/fixtures/many.sh

+1-1
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)