Commit a1a440c2 authored by David Dykstra's avatar David Dykstra

Make --whole-file the default when source and target are on the local machine.

parent 089e73f8
......@@ -581,6 +581,7 @@ static int start_client(int argc, char *argv[])
extern int am_sender;
extern char *shell_cmd;
extern int rsync_port;
extern int whole_file;
char *argv0 = strdup(argv[0]);
if (strncasecmp(URL_PREFIX, argv0, strlen(URL_PREFIX)) == 0) {
......@@ -627,6 +628,8 @@ static int start_client(int argc, char *argv[])
p = find_colon(argv[argc-1]);
if (!p) {
local_server = 1;
/* disable "rsync algorithm" when both sides local */
whole_file = 1;
} else if (p[1] == ':') {
*p = 0;
return start_socket_client(argv[argc-1], p+2, argc-1, argv);
......
mailto(rsync-bugs@samba.org)
manpage(rsync)(1)(3 Mar 2001)()()
manpage(rsync)(1)(29 May 2001)()()
manpagename(rsync)(faster, flexible replacement for rcp)
manpagesynopsis()
......@@ -395,8 +395,11 @@ are in the list of files being sent.
This option can be quite slow, so only use it if you need it.
dit(bf(-W, --whole-file)) With this option the incremental rsync algorithm
is not used and the whole file is sent as-is instead. This may be
useful when using rsync with a local machine.
is not used and the whole file is sent as-is instead. The transfer may be
faster if this option is used when the bandwidth between the source and
target machines is higher than the bandwidth to disk (especially when the
"disk" is actually a networked file system). This is the default when both
the source and target are on the local machine.
dit(bf(-p, --perms)) This option causes rsync to update the remote
permissions to be the same as the local permissions.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment