./configure (optional if already run)
make
-based-on: 55b2a06812e39f15f52e92b979600cb82be210cb
+based-on: deb26c7cfcdfd471fd454747a6946d3a3d0d089d
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -52,6 +52,7 @@ extern int preserve_links;
+@@ -53,6 +53,7 @@ extern int preserve_links;
extern int preserve_hard_links;
extern int preserve_devices;
extern int preserve_specials;
extern int delete_during;
extern int missing_args;
extern int eol_nulls;
-@@ -385,6 +386,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -386,6 +387,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
static time_t crtime;
#endif
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
#endif
-@@ -428,6 +432,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -429,6 +433,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
xflags |= XMIT_SAME_MODE;
else
mode = file->mode;
if (preserve_devices && IS_DEVICE(mode)) {
if (protocol_version < 28) {
-@@ -589,6 +601,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -590,6 +602,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
#endif
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
if (atimes_ndx && !S_ISDIR(mode) && !(xflags & XMIT_SAME_ATIME))
write_varlong(f, atime, 4);
if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
-@@ -683,6 +699,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -684,6 +700,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
static time_t crtime;
#endif
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
#endif
-@@ -799,6 +818,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -801,6 +820,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
#ifdef SUPPORT_CRTIMES
if (crtimes_ndx)
crtime = F_CRTIME(first);
#endif
if (preserve_uid)
uid = F_OWNER(first);
-@@ -871,6 +894,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -874,6 +897,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
if (chmod_modes && !S_ISLNK(mode) && mode)
mode = tweak_mode(mode, chmod_modes);
if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
if (protocol_version < 30)
-@@ -1029,6 +1056,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -1042,6 +1069,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
}
#endif
file->mode = mode;
if (preserve_uid)
F_OWNER(file) = uid;
if (preserve_gid) {
-@@ -1430,6 +1461,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1455,6 +1486,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
}
#endif
file->mode = st.st_mode;
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -43,10 +43,12 @@ extern int write_devices;
+@@ -43,10 +43,12 @@ extern int preserve_devices;
extern int preserve_specials;
extern int preserve_hard_links;
extern int preserve_executability;
#ifdef SUPPORT_HARD_LINKS
if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
-@@ -2102,17 +2126,25 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2104,17 +2128,25 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
continue;
fname = f_name(file, NULL);
if (fix_dir_perms)
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -53,6 +53,7 @@ int preserve_hard_links = 0;
+@@ -54,6 +54,7 @@ int preserve_hard_links = 0;
int preserve_acls = 0;
int preserve_xattrs = 0;
int preserve_perms = 0;
int preserve_executability = 0;
int preserve_devices = 0;
int preserve_specials = 0;
-@@ -94,6 +95,7 @@ int msgs2stderr = 2; /* Default: send errors to stderr for local & remote-shell
+@@ -95,6 +96,7 @@ int msgs2stderr = 2; /* Default: send errors to stderr for local & remote-shell
int saw_stderr_opt = 0;
int allow_8bit_chars = 0;
int force_delete = 0;
int io_timeout = 0;
int prune_empty_dirs = 0;
int use_qsort = 0;
-@@ -618,6 +620,8 @@ static struct poptOption long_options[] = {
+@@ -619,6 +621,8 @@ static struct poptOption long_options[] = {
{"perms", 'p', POPT_ARG_VAL, &preserve_perms, 1, 0, 0 },
{"no-perms", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"no-p", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"executability", 'E', POPT_ARG_NONE, &preserve_executability, 0, 0, 0 },
{"acls", 'A', POPT_ARG_NONE, 0, 'A', 0, 0 },
{"no-acls", 0, POPT_ARG_VAL, &preserve_acls, 0, 0, 0 },
-@@ -715,6 +719,12 @@ static struct poptOption long_options[] = {
+@@ -717,6 +721,12 @@ static struct poptOption long_options[] = {
{"remove-source-files",0,POPT_ARG_VAL, &remove_source_files, 1, 0, 0 },
{"force", 0, POPT_ARG_VAL, &force_delete, 1, 0, 0 },
{"no-force", 0, POPT_ARG_VAL, &force_delete, 0, 0, 0 },
{"ignore-errors", 0, POPT_ARG_VAL, &ignore_errors, 1, 0, 0 },
{"no-ignore-errors", 0, POPT_ARG_VAL, &ignore_errors, 0, 0, 0 },
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
-@@ -1005,6 +1015,14 @@ static void set_refuse_options(void)
+@@ -1009,6 +1019,14 @@ static void set_refuse_options(void)
#ifndef SUPPORT_CRTIMES
parse_one_refuse_match(0, "crtimes", list_end);
#endif
/* Now we use the descrip values to actually mark the options for refusal. */
for (op = long_options; op != list_end; op++) {
-@@ -2685,6 +2703,9 @@ void server_options(char **args, int *argc_p)
+@@ -2689,6 +2707,9 @@ void server_options(char **args, int *argc_p)
if (xfer_dirs && !recurse && delete_mode && am_sender)
args[ac++] = "--no-r";
if (do_compression && do_compression_level != CLVL_NOT_SPECIFIED) {
if (asprintf(&arg, "--compress-level=%d", do_compression_level) < 0)
goto oom;
-@@ -2780,6 +2801,16 @@ void server_options(char **args, int *argc_p)
+@@ -2784,6 +2805,16 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--delete-excluded";
if (force_delete)
args[ac++] = "--force";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -366,6 +366,7 @@ has its own detailed description later in this man page.
+@@ -366,6 +366,7 @@ has its own detailed description later in this manpage.
--keep-dirlinks, -K treat symlinked dir on receiver as dir
--hard-links, -H preserve hard links
--perms, -p preserve permissions
--executability, -E preserve executability
--chmod=CHMOD affect file and/or directory permissions
--acls, -A preserve ACLs (implies --perms)
-@@ -406,7 +407,10 @@ has its own detailed description later in this man page.
+@@ -407,7 +408,10 @@ has its own detailed description later in this manpage.
--ignore-missing-args ignore missing source args without error
--delete-missing-args delete missing source args from destination
--ignore-errors delete even if there are I/O errors
--max-delete=NUM don't delete more than NUM files
--max-size=SIZE don't transfer any file larger than SIZE
--min-size=SIZE don't transfer any file smaller than SIZE
-@@ -738,6 +742,7 @@ your home directory (remove the '=' for that).
+@@ -739,6 +743,7 @@ your home directory (remove the '=' for that).
recursion and want to preserve almost everything. Be aware that it does
**not** include preserving ACLs (`-A`), xattrs (`-X`), atimes (`-U`),
crtimes (`-N`), nor the finding and preserving of hardlinks (`-H`).
The only exception to the above equivalence is when [`--files-from`](#opt)
is specified, in which case [`-r`](#opt) is not implied.
-@@ -1198,7 +1203,7 @@ your home directory (remove the '=' for that).
+@@ -1199,7 +1204,7 @@ your home directory (remove the '=' for that).
Without this option, if the sending side has replaced a directory with a
symlink to a directory, the receiving side will delete anything that is in
the way of the new symlink, including a directory hierarchy (as long as
See also [`--keep-dirlinks`](#opt) for an analogous option for the
receiving side.
-@@ -1393,6 +1398,37 @@ your home directory (remove the '=' for that).
+@@ -1394,6 +1399,37 @@ your home directory (remove the '=' for that).
those used by [`--fake-super`](#opt)) unless you repeat the option (e.g. `-XX`).
This "copy all xattrs" mode cannot be used with [`--fake-super`](#opt).
0. `--chmod=CHMOD`
This option tells rsync to apply one or more comma-separated "chmod" modes
-@@ -1888,8 +1924,8 @@ your home directory (remove the '=' for that).
+@@ -1897,8 +1933,8 @@ your home directory (remove the '=' for that).
[`--ignore-missing-args`](#opt) option a step farther: each missing arg
will become a deletion request of the corresponding destination file on the
receiving side (should it exist). If the destination file is a non-empty
independent of any other type of delete processing.
The missing source files are represented by special file-list entries which
-@@ -1900,14 +1936,14 @@ your home directory (remove the '=' for that).
+@@ -1909,14 +1945,14 @@ your home directory (remove the '=' for that).
Tells [`--delete`](#opt) to go ahead and delete files even when there are
I/O errors.
[`--recursive`](#opt) option was also enabled.
0. `--max-delete=NUM`
-@@ -2904,7 +2940,7 @@ your home directory (remove the '=' for that).
+@@ -2913,7 +2949,7 @@ your home directory (remove the '=' for that).
also turns on the output of other verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general