From 3d53e7fe1c31aa440cc9708c7c51db6b78c07653 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Thu, 12 Apr 2012 12:47:30 +0100 Subject: 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. --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index c8d2bbcf0..42df465dc 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,11 @@ GNU coreutils NEWS -*- outline -*- * Noteworthy changes in release ?.? (????-??-??) [?] +** Changes in behavior + + cp --attributes-only no longer truncates any existing destination file, + allowing for more general copying of attributes from one file to another. + * Noteworthy changes in release 8.16 (2012-03-26) [stable] -- cgit v1.2.3-54-g00ecf