diff options
author | Pádraig Brady <P@draigBrady.com> | 2012-04-12 12:47:30 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2012-04-12 18:35:17 +0100 |
commit | 3d53e7fe1c31aa440cc9708c7c51db6b78c07653 (patch) | |
tree | 13fc2d863087f5a0e2664592aa4902308e6fb0f0 /tests/Makefile.am | |
parent | 7e0ef7c035a4ef331dfd5019465ad00171a7b800 (diff) | |
download | coreutils-3d53e7fe1c31aa440cc9708c7c51db6b78c07653.tar.xz |
cp: change --attributes-only to not truncate existing files
* src/copy.c (copy_reg): Don't truncate an existing file,
to support copying attributes between existing files.
The original use case only considered creating new files,
and it would be a very unusual use case to be relying
on the truncating behavior.
* doc/coreutils.texi (cp invocation): Mention the non
truncating behavior.
* tests/cp/attr-existing: A new test to ensure O_TRUNC skipped.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the change in behavior.
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r-- | tests/Makefile.am | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 011051aa5..4d73a92b5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -320,6 +320,7 @@ TESTS = \ chown/separator \ cp/abuse \ cp/acl \ + cp/attr-existing \ cp/backup-1 \ cp/backup-dir \ cp/backup-is-src \ |