X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/9c25eef5a53f1970a5379ac5320ff4172d08959a..790ba11acdb77fcd3d81ba5749081f79ded86d04:/link-by-hash.diff diff --git a/link-by-hash.diff b/link-by-hash.diff index 9532c5b..9a9c9ae 100644 --- a/link-by-hash.diff +++ b/link-by-hash.diff @@ -16,7 +16,7 @@ To use this patch, run these commands for a successful build: +++ new/Makefile.in @@ -35,7 +35,7 @@ OBJS1=flist.o rsync.o generator.o receiv util.o main.o checksum.o match.o syscall.o log.o backup.o - OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o \ + OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o \ fileio.o batch.o clientname.o chmod.o acls.o xattrs.o -OBJS3=progress.o pipe.o +OBJS3=progress.o pipe.o hashlink.o @@ -25,15 +25,15 @@ To use this patch, run these commands for a successful build: popt/popthelp.o popt/poptparse.o --- old/flist.c +++ new/flist.c -@@ -63,6 +63,7 @@ extern int copy_unsafe_links; - extern int protocol_version; +@@ -65,6 +65,7 @@ extern int protocol_version; extern int sanitize_paths; extern struct stats stats; + extern char *filesfrom_host; +extern char *link_by_hash_dir; extern char curr_dir[MAXPATHLEN]; -@@ -818,7 +819,7 @@ static struct file_struct *recv_file_ent +@@ -834,7 +835,7 @@ static struct file_struct *recv_file_ent extra_len += (S_ISDIR(mode) ? 2 : 1) * EXTRA_LEN; #endif @@ -391,7 +391,7 @@ To use this patch, run these commands for a successful build: char *config_file = NULL; char *shell_cmd = NULL; char *logfile_name = NULL; -@@ -384,6 +385,7 @@ void usage(enum logcode F) +@@ -385,6 +386,7 @@ void usage(enum logcode F) rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n"); rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n"); rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n"); @@ -399,7 +399,7 @@ To use this patch, run these commands for a successful build: rprintf(F," -z, --compress compress file data during the transfer\n"); rprintf(F," --compress-level=NUM explicitly set compression level\n"); rprintf(F," --skip-compress=LIST skip compressing files with a suffix in LIST\n"); -@@ -435,7 +437,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP +@@ -437,7 +439,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP, OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD, OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE, @@ -408,7 +408,7 @@ To use this patch, run these commands for a successful build: OPT_SERVER, OPT_REFUSED_BASE = 9000}; static struct poptOption long_options[] = { -@@ -554,6 +556,7 @@ static struct poptOption long_options[] +@@ -558,6 +560,7 @@ static struct poptOption long_options[] {"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 }, {"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 }, {"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 }, @@ -416,7 +416,7 @@ To use this patch, run these commands for a successful build: {"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 }, {"compress", 'z', POPT_ARG_NONE, 0, 'z', 0, 0 }, {"no-compress", 0, POPT_ARG_VAL, &do_compression, 0, 0, 0 }, -@@ -1205,6 +1208,21 @@ int parse_arguments(int *argc, const cha +@@ -1216,6 +1219,21 @@ int parse_arguments(int *argc_p, const c return 0; #endif @@ -438,7 +438,7 @@ To use this patch, run these commands for a successful build: default: /* A large opt value means that set_refuse_options() * turned this option off. */ -@@ -1929,6 +1947,11 @@ void server_options(char **args,int *arg +@@ -1954,6 +1972,11 @@ void server_options(char **args, int *ar } else if (inplace) args[ac++] = "--inplace"; @@ -525,7 +525,7 @@ To use this patch, run these commands for a successful build: --- old/rsync.c +++ new/rsync.c -@@ -48,6 +48,7 @@ extern int inplace; +@@ -47,6 +47,7 @@ extern int inplace; extern int flist_eof; extern int keep_dirlinks; extern int make_backups; @@ -533,7 +533,7 @@ To use this patch, run these commands for a successful build: extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct chmod_mode_struct *daemon_chmod_modes; #ifdef ICONV_OPTION -@@ -458,8 +459,15 @@ void finish_transfer(const char *fname, +@@ -457,8 +458,15 @@ void finish_transfer(const char *fname, /* move tmp file over real file */ if (verbose > 2) rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname); @@ -553,7 +553,7 @@ To use this patch, run these commands for a successful build: ret == -2 ? "copy" : "rename", --- old/rsync.h +++ new/rsync.h -@@ -778,6 +778,14 @@ struct stats { +@@ -768,6 +768,14 @@ struct stats { int current_file_index; };