The latest --link-dest option is now compatible with --inplace,
authorWayne Davison <wayned@samba.org>
Sat, 15 Jan 2005 20:31:15 +0000 (20:31 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 15 Jan 2005 20:31:15 +0000 (20:31 +0000)
so remove that restriction too.

inplace-protocol-bump.diff

index 2bdf703..170d08b 100644 (file)
@@ -3,9 +3,9 @@ sender if --inplace was specified.  This allows the sender to know when
 the transfer can fully utilize the basis file (i.e., when the basis file
 is not the destination file).
 
---- orig/generator.c   2004-11-27 17:53:24
+--- orig/generator.c   2005-01-14 18:30:18
 +++ generator.c        2004-11-03 20:37:57
-@@ -600,6 +600,8 @@ prepare_to_open:
+@@ -593,6 +593,8 @@ prepare_to_open:
  
  notify_others:
        write_int(f_out, i);
@@ -14,7 +14,7 @@ is not the destination file).
        if (f_out_name >= 0)
                write_byte(f_out_name, fnamecmp_type);
  
---- orig/match.c       2004-09-07 21:45:30
+--- orig/match.c       2005-01-01 21:11:00
 +++ match.c    2004-11-12 05:48:57
 @@ -23,8 +23,8 @@ extern int verbose;
  extern int am_server;
@@ -27,7 +27,7 @@ is not the destination file).
  
  typedef unsigned short tag;
  
-@@ -203,9 +203,9 @@ static void hash_search(int f,struct sum
+@@ -206,9 +206,9 @@ static void hash_search(int f,struct sum
                        if (l != s->sums[i].len)
                                continue;
  
@@ -39,7 +39,7 @@ is not the destination file).
                            && !(s->sums[i].flags & SUMFLG_SAME_OFFSET))
                                continue;
  
-@@ -224,10 +224,10 @@ static void hash_search(int f,struct sum
+@@ -227,10 +227,10 @@ static void hash_search(int f,struct sum
                                continue;
                        }
  
@@ -52,7 +52,7 @@ is not the destination file).
                                do {
                                        size_t i2 = targets[j].i;
                                        if (s->sums[i2].offset != offset)
-@@ -250,7 +250,7 @@ static void hash_search(int f,struct sum
+@@ -253,7 +253,7 @@ static void hash_search(int f,struct sum
                        /* we've found a match, but now check to see
                         * if want_i can hint at a better match. */
                        if (i != want_i && want_i < s->count
@@ -61,22 +61,22 @@ is not the destination file).
                             || s->sums[want_i].flags & SUMFLG_SAME_OFFSET)
                            && sum == s->sums[want_i].sum1
                            && memcmp(sum2, s->sums[want_i].sum2, s->s2length) == 0) {
---- orig/options.c     2004-11-27 17:53:24
-+++ options.c  2004-11-27 18:18:27
-@@ -957,10 +957,9 @@ int parse_arguments(int *argc, const cha
-                        am_server ? "server" : "client");
-               return 0;
- #endif
--              if (compare_dest || copy_dest || link_dest) {
-+              if (link_dest) {
-                       snprintf(err_buf, sizeof err_buf,
--                               "--inplace does not yet work with %s\n",
--                               dest_option);
-+                               "--inplace does not yet work with --link-dest\n");
+--- orig/options.c     2005-01-15 20:26:21
++++ options.c  2005-01-15 20:26:06
+@@ -952,12 +952,6 @@ int parse_arguments(int *argc, const cha
                        return 0;
                }
-       } else {
---- orig/rsync.h       2004-11-27 17:53:24
+               keep_partial = 0;
+-              if (dest_option) {
+-                      snprintf(err_buf, sizeof err_buf,
+-                               "--inplace does not yet work with %s\n",
+-                               dest_option);
+-                      return 0;
+-              }
+ #else
+               snprintf(err_buf, sizeof err_buf,
+                        "--inplace is not supported on this %s\n",
+--- orig/rsync.h       2005-01-10 00:21:12
 +++ rsync.h    2004-11-03 20:32:34
 @@ -62,7 +62,7 @@
  #define FLAG_MOUNT_POINT (1<<2)       /* sender only */
@@ -87,7 +87,7 @@ is not the destination file).
  
  /* We refuse to interoperate with versions that are not in this range.
   * Note that we assume we'll work with later versions: the onus is on
---- orig/sender.c      2004-09-20 05:10:48
+--- orig/sender.c      2005-01-01 21:11:01
 +++ sender.c   2004-11-12 05:51:25
 @@ -27,7 +27,9 @@ extern int dry_run;
  extern int am_server;