You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This removes `-v` from an `rm -R` command in `make_basic_repo.sh`,
which can cause tests that needed to run that fixture to fail on
systems where `rm` does not support `-v`.
The script generates a fixtured used in numerous tests, and it is
always run even if `GIX_TEST_IGNORE_ARCHIVES` is not set, since its
output is `.gitignore`d. Because the script is so heavily used,
this change allows many more tests to pass on systems where `rm`
does not recognize `-v` than before.
`rm -v` is actually POSIX, but it was standardized very recently,
in 1003.1-2024; it was not even required in 1003.1-2017. Some Unix
systems' `rm` commands do not recognize `-v`. This includes most
(or all?) illumos and Solaris systems (except when `/usr/gnu/bin`
is present and placed early in the `$PATH`). It seems likely that
there are a number of other such systems.
Regarding the history of `rm -v` in POSIX, see:
- https://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html
- https://pubs.opengroup.org/onlinepubs/9799919799/utilities/rm.html
- https://www.austingroupbugs.net/view.php?id=1154
- https://www.austingroupbugs.net/view.php?id=1365
- https://www.austingroupbugs.net/view.php?id=1487
Based on a `git grep -En 'rm( -[^v ;&|]*)+v'` search, this
occurrence in `make_basic_repo.sh` appears to be the only place
where `-v` is passed to `rm` in any gitoxide fixture script.
Two nearby similar, conceptually related commands omit `-v`, and
when this command (rather, the command that turned into it) was
introduced in the first version of the script in a4cec4a (#399),
another such command without `-v` was also present. This suggests
that `-v` may have been used for exploratory purposes during
development, such that the approach here of omitting `-v` it
without replacing it with anything might be sufficient.
However, it is possible for information shown when the fixture
script runs and fails to be less informative as a result of this
omission. An alternative approach to the one taken here could be to
have the script carry out a tiny experiment to check if `-v` is
supported, then use it only if it was found to be accepted.
(Another option could be to use `find` with both `-print` and
`-delete`, though that might be stronger than desired given that
the affected `rm` command does not pass `-f`.)
0 commit comments