remote connections. (Frank Schulz)
<http://lists.samba.org/pipermail/rsync/2002-March/006526.html>
Also, add documentation for whole_file and add assertions that the
value is valid.
* Fix minor memory leak in socket code. (Dave Dykstra, Martin
Pool.)
+
+ * Fix --whole-file problem that caused it to be the default even
+ for remote connections. (Frank Schulz)
return;
}
+ assert(whole_file == 0 || whole_file == 1);
+ /* We should have decided by now.* /
if (whole_file) {
write_int(f_out,i);
send_sums(NULL,f_out);
#include "popt.h"
int make_backups = 0;
+
+/**
+ * Should we send the whole file as literal data rather than trying to
+ * create an incremental diff? This is on by default when both source
+ * and destination are local and we're not doing a batch delta,
+ * because there it's no cheaper to read the whole basis file than to
+ * just rewrite it.
+ *
+ * -1 means "unspecified", i.e. depend on is_local; 0 means off; 1 means on.
+ **/
int whole_file = -1;
+
int copy_links = 0;
int preserve_links = 0;
int preserve_hard_links = 0;
argstr[x++] = 'l';
if (copy_links)
argstr[x++] = 'L';
+
+ assert(whole_file == 0 || whole_file == -1);
if (whole_file)
argstr[x++] = 'W';
+ else
+ args[ac++] = "--no-whole-file";
+
if (preserve_hard_links)
argstr[x++] = 'H';
if (preserve_uid)
args[ac++] = compare_dest;
}
-
*argc = ac;
}
#include <compat.h>
#endif
+#include <assert.h>
+
#define BOOL int