@@ -16,7 +16,7 @@ To use this patch, run these commands for a successful build:
16
16
./configure (optional if already run)
17
17
make
18
18
19
- based-on: 55b2a06812e39f15f52e92b979600cb82be210cb
19
+ based-on: d821e4cbfbc66848cdf91a336af26fdb89dd9a8f
20
20
diff --git a/clientserver.c b/clientserver.c
21
21
--- a/clientserver.c
22
22
+++ b/clientserver.c
@@ -69,23 +69,23 @@ diff --git a/flist.c b/flist.c
69
69
extern int checksum_type;
70
70
extern int module_id;
71
71
extern int ignore_errors;
72
- @@ -62 ,6 +64 ,7 @@ extern int implied_dirs;
72
+ @@ -63 ,6 +65 ,7 @@ extern int implied_dirs;
73
73
extern int ignore_perishable;
74
74
extern int non_perishable_cnt;
75
75
extern int prune_empty_dirs;
76
76
+ extern int checksum_files;
77
77
extern int copy_links;
78
78
extern int copy_unsafe_links;
79
79
extern int protocol_version;
80
- @@ -73 ,6 +76 ,7 @@ extern int sender_symlink_iconv;
80
+ @@ -74 ,6 +77 ,7 @@ extern int sender_symlink_iconv;
81
81
extern int output_needs_newline;
82
82
extern int sender_keeps_checksum;
83
83
extern int unsort_ndx;
84
84
+ extern char *basis_dir[];
85
85
extern uid_t our_uid;
86
86
extern struct stats stats;
87
87
extern char *filesfrom_host;
88
- @@ -90 ,6 +94 ,20 @@ extern int filesfrom_convert;
88
+ @@ -91 ,6 +95 ,20 @@ extern int filesfrom_convert;
89
89
extern iconv_t ic_send, ic_recv;
90
90
#endif
91
91
@@ -106,7 +106,7 @@ diff --git a/flist.c b/flist.c
106
106
#define PTR_SIZE (sizeof (struct file_struct *))
107
107
108
108
int io_error;
109
- @@ -134 ,8 +152 ,12 @@ static char empty_sum[MAX_DIGEST_LEN];
109
+ @@ -135 ,8 +153 ,12 @@ static char empty_sum[MAX_DIGEST_LEN];
110
110
static int flist_count_offset; /* for --delete --progress */
111
111
static int show_filelist_progress;
112
112
@@ -120,7 +120,7 @@ diff --git a/flist.c b/flist.c
120
120
static void output_flist(struct file_list *flist);
121
121
122
122
void init_flist(void)
123
- @@ -326 ,6 +348 ,235 @@ static void flist_done_allocating(struct file_list *flist)
123
+ @@ -327 ,6 +349 ,235 @@ static void flist_done_allocating(struct file_list *flist)
124
124
flist->pool_boundary = ptr;
125
125
}
126
126
@@ -356,7 +356,7 @@ diff --git a/flist.c b/flist.c
356
356
/* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
357
357
* F_PATHNAME(), or (2) "NULL, dir, dirlen" to chdir() to the supplied dir,
358
358
* with dir == NULL taken to be the starting directory, and dirlen < 0
359
- @@ -1203 ,7 +1454 ,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
359
+ @@ -1216 ,7 +1467 ,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
360
360
STRUCT_STAT *stp, int flags, int filter_level)
361
361
{
362
362
static char *lastdir;
@@ -365,7 +365,7 @@ diff --git a/flist.c b/flist.c
365
365
struct file_struct *file;
366
366
char thisname[MAXPATHLEN];
367
367
char linkname[MAXPATHLEN];
368
- @@ -1349 ,9 +1600 ,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
368
+ @@ -1362 ,9 +1613 ,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
369
369
memcpy(lastdir, thisname, len);
370
370
lastdir[len] = '\0';
371
371
lastdir_len = len;
@@ -383,7 +383,7 @@ diff --git a/flist.c b/flist.c
383
383
basename_len = strlen(basename) + 1; /* count the '\0' */
384
384
385
385
#ifdef SUPPORT_LINKS
386
- @@ -1369 ,11 +1627 ,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
386
+ @@ -1394 ,11 +1652 ,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
387
387
extra_len += EXTRA_LEN;
388
388
#endif
389
389
@@ -397,7 +397,7 @@ diff --git a/flist.c b/flist.c
397
397
398
398
#if EXTRA_ROUNDING > 0
399
399
if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
400
- @@ -1462 ,8 +1717 ,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
400
+ @@ -1487 ,8 +1742 ,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
401
401
return NULL;
402
402
}
403
403
@@ -414,7 +414,7 @@ diff --git a/flist.c b/flist.c
414
414
415
415
if (unsort_ndx)
416
416
F_NDX(file) = stats.num_dirs;
417
- @@ -2680 ,7 +2941 ,7 @@ struct file_list *recv_file_list(int f, int dir_ndx)
417
+ @@ -2705 ,7 +2966 ,7 @@ struct file_list *recv_file_list(int f, int dir_ndx)
418
418
/* The --relative option sends paths with a leading slash, so we need
419
419
* to specify the strip_root option here. We rejected leading slashes
420
420
* for a non-relative transfer in recv_file_entry(). */
@@ -423,7 +423,7 @@ diff --git a/flist.c b/flist.c
423
423
424
424
if (protocol_version < 30) {
425
425
/* Recv the io_error flag */
426
- @@ -2925 ,7 +3186 ,7 @@ void flist_free(struct file_list *flist)
426
+ @@ -2950 ,7 +3211 ,7 @@ void flist_free(struct file_list *flist)
427
427
428
428
/* This routine ensures we don't have any duplicate names in our file list.
429
429
* duplicate names can cause corruption because of the pipelining. */
@@ -432,7 +432,7 @@ diff --git a/flist.c b/flist.c
432
432
{
433
433
char fbuf[MAXPATHLEN];
434
434
int i, prev_i;
435
- @@ -2976 ,7 +3237 ,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
435
+ @@ -3001 ,7 +3262 ,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
436
436
/* If one is a dir and the other is not, we want to
437
437
* keep the dir because it might have contents in the
438
438
* list. Otherwise keep the first one. */
@@ -441,7 +441,7 @@ diff --git a/flist.c b/flist.c
441
441
struct file_struct *fp = flist->sorted[j];
442
442
if (!S_ISDIR(fp->mode))
443
443
keep = i, drop = j;
444
- @@ -2992 ,8 +3253 ,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
444
+ @@ -3017 ,8 +3278 ,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
445
445
} else
446
446
keep = j, drop = i;
447
447
@@ -452,7 +452,7 @@ diff --git a/flist.c b/flist.c
452
452
rprintf(FINFO,
453
453
"removing duplicate name %s from file list (%d)\n",
454
454
f_name(file, fbuf), drop + flist->ndx_start);
455
- @@ -3015 ,7 +3276 ,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
455
+ @@ -3040 ,7 +3301 ,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
456
456
}
457
457
flist->high = prev_i;
458
458
@@ -607,7 +607,7 @@ diff --git a/generator.c b/generator.c
607
607
/* Sets fnamecmp_type to FNAMECMP_FUZZY or above. */
608
608
fuzzy_file = find_fuzzy(file, fuzzy_dirlist, &fnamecmp_type);
609
609
if (fuzzy_file) {
610
- @@ -1797 ,7 +1804 ,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
610
+ @@ -1803 ,7 +1810 ,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
611
611
;
612
612
else if (fnamecmp_type >= FNAMECMP_FUZZY)
613
613
;
@@ -648,15 +648,15 @@ diff --git a/loadparm.c b/loadparm.c
648
648
diff --git a/options.c b/options.c
649
649
--- a/options.c
650
650
+++ b/options.c
651
- @@ -122 ,6 +122 ,7 @@ size_t bwlimit_writemax = 0;
651
+ @@ -123 ,6 +123 ,7 @@ size_t bwlimit_writemax = 0;
652
652
int ignore_existing = 0;
653
653
int ignore_non_existing = 0;
654
654
int need_messages_from_generator = 0;
655
655
+ int checksum_files = CSF_IGNORE_FILES;
656
656
int max_delete = INT_MIN;
657
657
OFF_T max_size = -1;
658
658
OFF_T min_size = -1;
659
- @@ -577 ,7 +578 ,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
659
+ @@ -578 ,7 +579 ,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
660
660
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
661
661
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
662
662
OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_BLOCK_SIZE,
@@ -665,15 +665,15 @@ diff --git a/options.c b/options.c
665
665
OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS, OPT_OLD_ARGS,
666
666
OPT_STOP_AFTER, OPT_STOP_AT,
667
667
OPT_REFUSED_BASE = 9000};
668
- @@ -733 ,6 +734 ,7 @@ static struct poptOption long_options[] = {
668
+ @@ -735 ,6 +736 ,7 @@ static struct poptOption long_options[] = {
669
669
{"no-c", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
670
670
{"checksum-choice", 0, POPT_ARG_STRING, &checksum_choice, 0, 0, 0 },
671
671
{"cc", 0, POPT_ARG_STRING, &checksum_choice, 0, 0, 0 },
672
672
+ {"sumfiles", 0, POPT_ARG_STRING, 0, OPT_SUMFILES, 0, 0 },
673
673
{"block-size", 'B', POPT_ARG_STRING, 0, OPT_BLOCK_SIZE, 0, 0 },
674
674
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
675
675
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
676
- @@ -1736 ,6 +1738 ,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
676
+ @@ -1740 ,6 +1742 ,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
677
677
}
678
678
break;
679
679
@@ -697,7 +697,7 @@ diff --git a/options.c b/options.c
697
697
case OPT_INFO:
698
698
arg = poptGetOptArg(pc);
699
699
parse_output_words(info_words, info_levels, arg, USER_PRIORITY);
700
- @@ -2089 ,6 +2108 ,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
700
+ @@ -2093 ,6 +2112 ,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
701
701
}
702
702
#endif
703
703
@@ -710,15 +710,15 @@ diff --git a/options.c b/options.c
710
710
diff --git a/rsync.1.md b/rsync.1.md
711
711
--- a/rsync.1.md
712
712
+++ b/rsync.1.md
713
- @@ -342,6 +342,7 @@ has its own detailed description later in this man page .
713
+ @@ -342,6 +342,7 @@ has its own detailed description later in this manpage .
714
714
--quiet, -q suppress non-error messages
715
715
--no-motd suppress daemon-mode MOTD
716
716
--checksum, -c skip based on checksum, not mod-time & size
717
717
+ --sumfiles=MODE use .rsyncsums to speedup --checksum mode
718
718
--archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H)
719
719
--no-OPTION turn off an implied OPTION (e.g. --no-D)
720
720
--recursive, -r recurse into directories
721
- @@ -721 ,6 +722 ,8 @@ your home directory (remove the '=' for that).
721
+ @@ -722 ,6 +723 ,8 @@ your home directory (remove the '=' for that).
722
722
file that has the same size as the corresponding sender's file: files with
723
723
either a changed size or a changed checksum are selected for transfer.
724
724
@@ -727,7 +727,7 @@ diff --git a/rsync.1.md b/rsync.1.md
727
727
Note that rsync always verifies that each _transferred_ file was correctly
728
728
reconstructed on the receiving side by checking a whole-file checksum that
729
729
is generated as the file is transferred, but that automatic
730
- @@ -732 ,6 +735 ,38 @@ your home directory (remove the '=' for that).
730
+ @@ -733 ,6 +736 ,38 @@ your home directory (remove the '=' for that).
731
731
option or an environment variable that is discussed in that option's
732
732
section.
733
733
0 commit comments