A few more tweaks.
[rsync/rsync-patches.git] / date-only.diff
CommitLineData
07b2cce7
MP
1Greetings, and thanks for all of your work on the wonderful rsync!
2
3I recently had the need to transfer files only with different mod
4dates (and to *not* transfer them based on file size differences).
5This is because I'm backing up files remotely on an untrusted machine,
6so I'm encrypting them with gpg before transfer. I discovered that
7rsync didn't already have a --date-only flag, so I added one and am
8enclosing the diffs in case you (as I hope) decide to include this
9option in future releases.
10
11Again, thanks!
12
13Best Regards,
14Jeremy Bornstein
15diff rsync-2.5.4/README rsync-2.5.4-patched/README
1670a71
17> --date-only only use modification date when determining if a file should be transferred
18Common subdirectories: rsync-2.5.4/doc and rsync-2.5.4-patched/doc
19diff rsync-2.5.4/generator.c rsync-2.5.4-patched/generator.c
2039a40
21> extern int date_only;
2250a52,56
23> if (date_only) {
24> return (cmp_modtime(st->st_mtime,file->modtime) == 0);
25> }
26>
27>
28Common subdirectories: rsync-2.5.4/lib and rsync-2.5.4-patched/lib
29diff rsync-2.5.4/options.c rsync-2.5.4-patched/options.c
3064a65
31> int date_only=0;
32223a225
33> rprintf(F," --date-only only use modification date when determining if a file should be transferred\n");
34265c267
35< OPT_LOG_FORMAT, OPT_PASSWORD_FILE, OPT_SIZE_ONLY, OPT_ADDRESS,
36---
37> OPT_LOG_FORMAT, OPT_PASSWORD_FILE, OPT_SIZE_ONLY, OPT_DATE_ONLY, OPT_ADDRESS,
38278a281
39> {"date-only", 0, POPT_ARG_NONE, &date_only},
40704a708,710
41>
42> if (date_only)
43> args[ac++] = "--date-only";
44Common subdirectories: rsync-2.5.4/packaging and rsync-2.5.4-patched/packaging
45Common subdirectories: rsync-2.5.4/popt and rsync-2.5.4-patched/popt
46diff rsync-2.5.4/rsync.1 rsync-2.5.4-patched/rsync.1
47289a290
48> --date-only only use modification date when determining if a file should be transferred
49363a365,371
50> .IP
51> .IP "\fB--date-only\fP"
52> Normally rsync will skip any files that are
53> already the same length and have the same time-stamp\&. With the
54> --date-only option files will be skipped if they have the same timestamp,
55> regardless of size\&. This may be useful when the remote files have passed
56> through a size-changing filter, e.g. for encryption\&.
57diff rsync-2.5.4/rsync.yo rsync-2.5.4-patched/rsync.yo
58260a261
59> --date-only only use modification date when determining if a file should be transferred
60326a328,333
61>
62> dit(bf(--date-only)) Normally rsync will skip any files that are
63> already the same length and have the same time-stamp. With the
64> --date-only option files will be skipped if they have the same
65> timestamp, regardless of size. This may be useful when the remote
66> files have passed through a size-changing filter, e.g. for encryption.
67Common subdirectories: rsync-2.5.4/testhelp and rsync-2.5.4-patched/testhelp
68Common subdirectories: rsync-2.5.4/testsuite and rsync-2.5.4-patched/testsuite
69Common subdirectories: rsync-2.5.4/zlib and rsync-2.5.4-patched/zlib