X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/524e5ed55a8e931823c64098aab6937547fe08cb..dd0d95fa9c8eea3de9cc95fc27a6d1f4f051439c:/link-by-hash.diff diff --git a/link-by-hash.diff b/link-by-hash.diff index 59d4573..4a1cc5c 100644 --- a/link-by-hash.diff +++ b/link-by-hash.diff @@ -33,7 +33,7 @@ To use this patch, run these commands for a successful build: extern char curr_dir[MAXPATHLEN]; -@@ -712,7 +713,7 @@ static struct file_struct *recv_file_ent +@@ -715,7 +716,7 @@ static struct file_struct *recv_file_ent } #endif @@ -452,7 +452,7 @@ To use this patch, run these commands for a successful build: args[ac++] = "--files-from"; --- old/receiver.c +++ new/receiver.c -@@ -124,12 +124,14 @@ int get_tmpname(char *fnametmp, char *fn +@@ -123,12 +123,14 @@ int get_tmpname(char *fnametmp, char *fn static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r, @@ -468,7 +468,7 @@ To use this patch, run these commands for a successful build: int32 len; OFF_T offset = 0; OFF_T offset2; -@@ -149,6 +151,9 @@ static int receive_data(int f_in, char * +@@ -148,6 +150,9 @@ static int receive_data(int f_in, char * } else mapbuf = NULL; @@ -478,7 +478,7 @@ To use this patch, run these commands for a successful build: sum_init(checksum_seed); if (append_mode > 0) { -@@ -191,6 +196,8 @@ static int receive_data(int f_in, char * +@@ -190,6 +195,8 @@ static int receive_data(int f_in, char * cleanup_got_literal = 1; sum_update(data, i); @@ -487,7 +487,7 @@ To use this patch, run these commands for a successful build: if (fd != -1 && write_file(fd,data,i) != i) goto report_write_error; -@@ -217,6 +224,8 @@ static int receive_data(int f_in, char * +@@ -216,6 +223,8 @@ static int receive_data(int f_in, char * see_token(map, len); sum_update(map, len); @@ -496,7 +496,7 @@ To use this patch, run these commands for a successful build: } if (updating_basis) { -@@ -259,6 +268,8 @@ static int receive_data(int f_in, char * +@@ -258,6 +267,8 @@ static int receive_data(int f_in, char * } sum_end(file_sum1); @@ -505,7 +505,7 @@ To use this patch, run these commands for a successful build: if (mapbuf) unmap_file(mapbuf); -@@ -274,7 +285,7 @@ static int receive_data(int f_in, char * +@@ -273,7 +284,7 @@ static int receive_data(int f_in, char * static void discard_receive_data(int f_in, OFF_T length) { @@ -514,7 +514,7 @@ To use this patch, run these commands for a successful build: } static void handle_delayed_updates(char *local_name) -@@ -621,7 +632,7 @@ int recv_files(int f_in, char *local_nam +@@ -622,7 +633,7 @@ int recv_files(int f_in, char *local_nam /* recv file data */ recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size, @@ -530,10 +530,10 @@ To use this patch, run these commands for a successful build: extern int make_backups; extern mode_t orig_umask; +extern char *link_by_hash_dir; - extern struct stats stats; extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct chmod_mode_struct *daemon_chmod_modes; -@@ -374,8 +375,15 @@ void finish_transfer(char *fname, char * + +@@ -373,8 +374,15 @@ void finish_transfer(char *fname, char * /* move tmp file over real file */ if (verbose > 2) rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);