Make the extra info on the "exists" messages optional.
authorWayne Davison <wayne@opencoder.net>
Tue, 22 Sep 2020 23:43:18 +0000 (16:43 -0700)
committerWayne Davison <wayne@opencoder.net>
Tue, 22 Sep 2020 23:45:07 +0000 (16:45 -0700)
NEWS.md
generator.c
rsync.1.md

diff --git a/NEWS.md b/NEWS.md
index 5254e6a9681ed4f79a25e0e380b4dc3e20d9e24c..d978222c40dd473a26aeb0a64330a1b5a7ce77ae 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -4,16 +4,6 @@
 
 ## Changes in this version:
 
-### OUTPUT CHANGES:
-
- - Added a parenthetic suffix to the "FILENAME exists" output of
-   `--ignore-existing --info=skip` (note that `-vv` implies `--info=skip`).
-   The skip message is now "FILENAME exists (INFO)" where the INFO is one of
-   uptodate, type differs, or differs.  The suffix may be omitted when using
-   `--checksum` unless `--info=skip2` was used (since we don't want to slow
-   down rsync with extra checksum operations unless the user really wants to
-   see the full difference info).
-
 ### BUG FIXES:
 
  - Fix a bug with `--mkpath` if a single-file copy specifies an existing
 
  - Optimize the AVX2 checksum code a bit more.
 
+ - Added extra info to the "FILENAME exists" output of `--ignore-existing` when
+   `--info=skip2` is used.  The skip message becomes "FILENAME exists (INFO)"
+   where the INFO is one of uptodate, type differs, or differs.
+
  - Some manpage improvements.
 
 ### PACKAGING RELATED:
index 2265f6023e5f15a5ee09a5dfe37ddb5a38329331..e3bc40a6347a9fbe17277daa02071eae5f9c5509 100644 (file)
@@ -1378,15 +1378,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
        if (ignore_existing > 0 && statret == 0
         && (!is_dir || stype != FT_DIR)) {
                if (INFO_GTE(SKIP, 1) && is_dir >= 0) {
-                       const char *suf;
-                       if (ftype != stype)
-                               suf = " (type differs)";
-                       else if (ftype == FT_REG && always_checksum > 0 && !INFO_GTE(SKIP, 2))
-                               suf = ""; /* skip quick-check checksum unless SKIP2 was specified */
-                       else if (quick_check_ok(ftype, fname, file, &sx.st))
-                               suf = " (uptodate)";
-                       else
-                               suf = " (differs)";
+                       const char *suf = "";
+                       if (INFO_GTE(SKIP, 2)) {
+                               if (ftype != stype)
+                                       suf = " (type differs)";
+                               else if (quick_check_ok(ftype, fname, file, &sx.st))
+                                       suf = " (uptodate)";
+                               else
+                                       suf = " (differs)";
+                       }
                        rprintf(FINFO, "%s exists%s\n", fname, suf);
                }
 #ifdef SUPPORT_HARD_LINKS
index d205d0ba56319f22eb7b233a1c522b2474f507d0..ba79eb7a6fe40cf5cc091b064a2e3d216a4ec316 100644 (file)
@@ -1606,14 +1606,10 @@ your home directory (remove the '=' for that).
     permissions on the hard-linked files).  This does mean that this option is
     only looking at the existing files in the destination hierarchy itself.
 
-    If `--info=skip` was specified (which is implied by `-vv`) then rsync
-    outputs a "FILENAME exists (INFO)" message where the INFO indicates one of
-    "uptodate", "type differs", or "differs".  However, if you specified the
-    `--checksum` option, you must have specified `--info-skip2` to get the
-    "differs" or "uptodate" info since rsync will not take the extra time to
-    checksum these skipped files unless you really want it to (a parenthetical
-    suffix that is not "type differs" is elided if we are skipping the checksum
-    check for an existing file).
+    When `--info=skip2` is used rsync will output "FILENAME exists (INFO)"
+    messages where the INFO indicates one of "uptodate", "type differs", or
+    "differs".  The first level of skip messages (which is also implied by
+    `-vv`) outputs the exists message without the "(INFO)" suffix.
 
 0.  `--remove-source-files`