From cc078f747f3db00e70b2ae2ad2ab34e8d54316d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Tue, 25 Apr 2023 11:07:36 +0100 Subject: 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. --- src/copy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/copy.c') 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; } -- cgit v1.2.1