]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Make --backup be set when --backup-dir is used
authorSamuel Henrique <samueloph@debian.org>
Mon, 22 Jun 2020 18:34:32 +0000 (19:34 +0100)
committerWayne Davison <wayne@opencoder.net>
Mon, 22 Jun 2020 20:05:17 +0000 (13:05 -0700)
options.c
rsync.1.md

index b5aaadeed170e5d24161570366124cafc2f3eeb7..961cd48c0c6ef15edb4bd648737825b590b2baec 100644 (file)
--- a/options.c
+++ b/options.c
@@ -2222,6 +2222,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
        }
        if (backup_dir) {
                size_t len;
+               make_backups = 1; /* --backup-dir implies --backup */
                while (*backup_dir == '.' && backup_dir[1] == '/')
                        backup_dir += 2;
                if (*backup_dir == '.' && backup_dir[1] == '\0')
index 4a3099b919ddbf7c8f87e7313c752df0cd9dbbc9..9acaed3c5a69a8c29ea89972f66745263c974422 100644 (file)
@@ -842,7 +842,7 @@ your home directory (remove the '=' for that).
 
 0.  `--backup-dir=DIR`
 
-    In combination with the `--backup` option, this tells rsync to store all
+    This implies the `--backup` option, and tells rsync to store all
     backups in the specified directory on the receiving side.  This can be used
     for incremental backups.  You can additionally specify a backup suffix
     using the `--suffix` option (otherwise the files backed up in the specified