Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
089e73f
)
Make --whole-file the default when source and target are on the local machine.
author
David Dykstra
<dwd@samba.org>
Tue, 29 May 2001 14:37:54 +0000
(14:37 +0000)
committer
David Dykstra
<dwd@samba.org>
Tue, 29 May 2001 14:37:54 +0000
(14:37 +0000)
main.c
patch
|
blob
|
blame
|
history
rsync.yo
patch
|
blob
|
blame
|
history
diff --git
a/main.c
b/main.c
index
f696474
..
63fab0d
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-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 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) {
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;
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);
} else if (p[1] == ':') {
*p = 0;
return start_socket_client(argv[argc-1], p+2, argc-1, argv);
diff --git
a/rsync.yo
b/rsync.yo
index
9da7023
..
3717b9e
100644
(file)
--- a/
rsync.yo
+++ b/
rsync.yo
@@
-1,5
+1,5
@@
mailto(rsync-bugs@samba.org)
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()
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
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.
dit(bf(-p, --perms)) This option causes rsync to update the remote
permissions to be the same as the local permissions.