X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/c0c7984e7f6009b6ab18ad3da998a56a9c0f083d..65ecbe359f898940a7ff6f8b0b5088d001ab66ea:/atimes.diff diff --git a/atimes.diff b/atimes.diff index 8e0f0a9..b25b217 100644 --- a/atimes.diff +++ b/atimes.diff @@ -46,14 +46,14 @@ diff --git a/flist.c b/flist.c extern int file_extra_cnt; @@ -379,7 +380,7 @@ int push_pathname(const char *dir, int len) - static void send_file_entry(int f, struct file_struct *file, int ndx, int first_ndx) + static void send_file_entry(int f, const char *fname, struct file_struct *file, int ndx, int first_ndx) { - static time_t modtime; + static time_t modtime, atime; static mode_t mode; #ifdef SUPPORT_HARD_LINKS static int64 dev; -@@ -487,6 +488,13 @@ static void send_file_entry(int f, struct file_struct *file, int ndx, int first_ +@@ -457,6 +458,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file, xflags |= XMIT_SAME_TIME; else modtime = file->modtime; @@ -67,7 +67,7 @@ diff --git a/flist.c b/flist.c #ifdef SUPPORT_HARD_LINKS if (tmp_dev != 0) { -@@ -559,6 +567,8 @@ static void send_file_entry(int f, struct file_struct *file, int ndx, int first_ +@@ -529,6 +537,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file, } if (!(xflags & XMIT_SAME_MODE)) write_int(f, to_wire_mode(mode)); @@ -76,7 +76,7 @@ diff --git a/flist.c b/flist.c if (preserve_uid && !(xflags & XMIT_SAME_UID)) { if (protocol_version < 30) write_int(f, uid); -@@ -645,7 +655,7 @@ static void send_file_entry(int f, struct file_struct *file, int ndx, int first_ +@@ -615,7 +625,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file, static struct file_struct *recv_file_entry(struct file_list *flist, int xflags, int f) { @@ -85,7 +85,7 @@ diff --git a/flist.c b/flist.c static mode_t mode; #ifdef SUPPORT_HARD_LINKS static int64 dev; -@@ -778,6 +788,16 @@ static struct file_struct *recv_file_entry(struct file_list *flist, +@@ -749,6 +759,16 @@ static struct file_struct *recv_file_entry(struct file_list *flist, } if (!(xflags & XMIT_SAME_MODE)) mode = from_wire_mode(read_int(f)); @@ -102,7 +102,7 @@ diff --git a/flist.c b/flist.c if (chmod_modes && !S_ISLNK(mode)) mode = tweak_mode(mode, chmod_modes); -@@ -907,6 +927,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist, +@@ -878,6 +898,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist, F_GROUP(file) = gid; file->flags |= gid_flags; } @@ -111,7 +111,7 @@ diff --git a/flist.c b/flist.c if (unsort_ndx) F_NDX(file) = flist->used + flist->ndx_start; -@@ -1244,6 +1266,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, +@@ -1215,6 +1237,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, F_OWNER(file) = st.st_uid; if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */ F_GROUP(file) = st.st_gid; @@ -131,7 +131,7 @@ diff --git a/generator.c b/generator.c extern int verbose; extern int dry_run; -@@ -642,6 +643,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre +@@ -645,6 +646,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre : iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & ITEM_MATCHED) && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname)) iflags |= ITEM_REPORT_TIME; @@ -141,7 +141,7 @@ diff --git a/generator.c b/generator.c #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST if (S_ISLNK(file->mode)) { ; -@@ -999,6 +1003,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx, +@@ -1002,6 +1006,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx, if (link_dest) { if (!hard_link_one(file, fname, cmpbuf, 1)) goto try_a_copy; @@ -150,7 +150,7 @@ diff --git a/generator.c b/generator.c if (preserve_hard_links && F_IS_HLINKED(file)) finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j); if (!maybe_ATTRS_REPORT && (verbose > 1 || stdout_format_has_i > 1)) { -@@ -1184,6 +1190,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx, +@@ -1187,6 +1193,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx, static void list_file_entry(struct file_struct *f) { char permbuf[PERMSTRING_SIZE]; @@ -158,7 +158,7 @@ diff --git a/generator.c b/generator.c double len; if (!F_IS_ACTIVE(f)) { -@@ -1198,14 +1205,16 @@ static void list_file_entry(struct file_struct *f) +@@ -1201,14 +1208,16 @@ static void list_file_entry(struct file_struct *f) #ifdef SUPPORT_LINKS if (preserve_links && S_ISLNK(f->mode)) { @@ -177,7 +177,7 @@ diff --git a/generator.c b/generator.c f_name(f, NULL)); } } -@@ -2009,7 +2018,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx) +@@ -2017,7 +2026,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx) STRUCT_STAT st; if (link_stat(fname, &st, 0) == 0 && cmp_time(st.st_mtime, file->modtime) != 0)