summaryrefslogtreecommitdiff
path: root/src/copy.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2023-04-25 11:07:36 +0100
committerPádraig Brady <P@draigBrady.com>2023-04-25 11:17:54 +0100
commitcc078f747f3db00e70b2ae2ad2ab34e8d54316d3 (patch)
tree17b8469d7af762a1779975bcd597180bf5384c41 /src/copy.c
parent7ea7c020e844687eec15fc4749760bb29dee541a (diff)
downloadcoreutils-cc078f747f3db00e70b2ae2ad2ab34e8d54316d3.tar.gz
copy: reduce verbosity of -i and -u with --verbose
Since skipping of files is central to the operation of -i and -u, and with -u one may be updating few files out of many, reinstate the verbosity of this functionality as it was before 9.3. * src/copy.c (copy_internal): Only output "skipped" message with --debug. Also adjust so message never changes with --debug. * tests/cp/cp-i.sh: Adjust accordingly. * tests/mv/mv-n.sh: Likewise. * tests/cp/debug.sh: Add explicit test case for message. * NEWS: Mention the change in behavior.
Diffstat (limited to 'src/copy.c')
-rw-r--r--src/copy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/copy.c b/src/copy.c
index 13d93324f..0dd059d2e 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -2433,10 +2433,10 @@ copy_internal (char const *src_name, char const *dst_name,
skip:
if (skipped)
{
- if (x->verbose)
- printf (_("skipped %s\n"), quoteaf (dst_name));
- else if (x->interactive == I_ALWAYS_NO)
+ if (x->interactive == I_ALWAYS_NO)
error (0, 0, _("not replacing %s"), quoteaf (dst_name));
+ else if (x->debug)
+ printf (_("skipped %s\n"), quoteaf (dst_name));
return_now = true;
}