X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/fdb46bbc5743b887083c94f8ed75cb9afca24b4a..3d3ad7f1cd5fa8fbcf4d38ec98dc129171945a4c:/atimes.diff diff --git a/atimes.diff b/atimes.diff index d3a624b..fd007e1 100644 --- a/atimes.diff +++ b/atimes.diff @@ -138,17 +138,17 @@ To use this patch, run these commands for a successful build: extern int omit_dir_times; extern int delete_mode; extern int delete_before; -@@ -548,6 +549,9 @@ void itemize(struct file_struct *file, i +@@ -547,6 +548,9 @@ void itemize(struct file_struct *file, i && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname)) || (keep_time && cmp_time(file->modtime, st->st_mtime) != 0)) iflags |= ITEM_REPORT_TIME; + if (preserve_atimes && !S_ISDIR(file->mode) && !S_ISLNK(file->mode) + && cmp_time(F_ATIME(file), st->st_atime) != 0) + iflags |= ITEM_REPORT_ATIME; - if ((unsigned)(st->st_mode & CHMOD_BITS) != (file->mode & CHMOD_BITS)) + if (!BITS_EQUAL(st->st_mode, file->mode, CHMOD_BITS)) iflags |= ITEM_REPORT_PERMS; if (preserve_uid && am_root && F_UID(file) != st->st_uid) -@@ -859,6 +863,8 @@ static int try_dests_reg(struct file_str +@@ -858,6 +862,8 @@ static int try_dests_reg(struct file_str if (link_dest) { if (!hard_link_one(file, fname, cmpbuf, 1)) goto try_a_copy; @@ -295,7 +295,7 @@ To use this patch, run these commands for a successful build: /* These flags are used in the live flist data. */ -@@ -125,6 +126,7 @@ +@@ -127,6 +128,7 @@ #define ATTRS_REPORT (1<<0) #define ATTRS_SKIP_MTIME (1<<1) @@ -303,15 +303,15 @@ To use this patch, run these commands for a successful build: #define FULL_FLUSH 1 #define NORMAL_FLUSH 0 -@@ -506,6 +508,7 @@ struct file_struct { +@@ -508,6 +510,7 @@ struct file_struct { union flist_extras { uid_t uid; /* The user ID number */ uid_t gid; /* The group ID number or GID_NONE */ + time_t utime; /* A unix-time value */ struct idev *idev; /* The hard-link info during matching */ - struct hlist *hlist; /* The hard-link info after matching */ int32 num; /* A signed number */ -@@ -548,6 +551,7 @@ extern int preserve_gid; + uint32 unum; /* An unsigned number */ +@@ -553,6 +556,7 @@ extern int preserve_gid; /* When the associated option is on, all entries will have these present: */ #define F_UID(f) REQ_EXTRA(f, preserve_uid)->uid #define F_GID(f) REQ_EXTRA(f, preserve_gid)->gid