1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 03:12:48 +02:00

cp,mv: skipping due to -u is success, not failure

This reverts the previous change, so that when a file
is skipped due to -u, this is not considered a failure.
* doc/coreutils.texi: Document this.
* src/copy.c (copy_internal): If --update says to skip,
treat this as success instead of failure.
* tests/mv/update.sh, tests/cp/slink-2-slink.sh:
Revert previous change, to match reverted behavior.
This commit is contained in:
Paul Eggert
2023-01-31 09:24:43 -08:00
parent 7a69df8899
commit 01503ce731
4 changed files with 8 additions and 8 deletions

View File

@@ -9191,8 +9191,8 @@ results in an error message on systems that do not support symbolic links.
@opindex --update
@cindex newer files, copying only
Do not copy a non-directory that has an existing destination with the
same or newer modification timestamp; silently fail instead.
If timestamps are being preserved,
same or newer modification timestamp; instead, silently skip the file
without failing. If timestamps are being preserved,
the comparison is to the source timestamp truncated to the
resolutions of the destination file system and of the system calls
used to update timestamps; this avoids duplicate work if several
@@ -10124,7 +10124,8 @@ fail with a diagnostic instead of copying and then removing the file.
@opindex --update
@cindex newer files, moving only
Do not move a non-directory that has an existing destination with the
same or newer modification timestamp; silently fail instead.
same or newer modification timestamp;
instead, silently skip the file without failing.
If the move is across file system boundaries, the comparison is to the
source timestamp truncated to the resolutions of the destination file
system and of the system calls used to update timestamps; this avoids