]> git.ipfire.org Git - thirdparty/coreutils.git/commit
install: allow the combination of --compare and --preserve-timestamps
authorCollin Funk <collin.funk1@gmail.com>
Sun, 1 Mar 2026 23:31:28 +0000 (15:31 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Thu, 5 Mar 2026 02:42:48 +0000 (18:42 -0800)
commitb7ff7e7c2cf9b65d7d941b39a3a0992e7bc6e6be
tree46c80e4727c33fa4013c5c97418e9d2185a23d19
parentb3fe24213ee350835097cefa8d0154f78ffd9d67
install: allow the combination of --compare and --preserve-timestamps

* NEWS: Mention the improvement.
* src/install.c (enum copy_status): New type to let the caller know if
the copy was performed or skipped.
(copy_file): Return the new type instead of bool. Reduce variable scope.
(install_file_in_file): Only strip the file if the copy was
performed. Update the timestamps if the copy was skipped.
(main): Don't error when --compare and --preserve-timestamps are
combined.
* tests/install/install-C.sh: Add some test cases.
NEWS
src/install.c
tests/install/install-C.sh