aboutsummaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2011-11-22 08:14:01 -0800
committerWayne Davison <wayned@samba.org>2011-11-23 12:29:25 -0800
commit48b51d0004922cb029c55fe921f5e7df1c0bff23 (patch)
tree3f5c04e0ea1f5dca95c3eafb3ab9119e51ec3e9d /options.c
parent7da17144fd764a2420a8d08897475c0b7fdbf956 (diff)
downloadandroid_external_rsync-48b51d0004922cb029c55fe921f5e7df1c0bff23.tar.gz
android_external_rsync-48b51d0004922cb029c55fe921f5e7df1c0bff23.tar.bz2
android_external_rsync-48b51d0004922cb029c55fe921f5e7df1c0bff23.zip
make repeated --fuzzy option look into alt-dest dirs.
Diffstat (limited to 'options.c')
-rw-r--r--options.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/options.c b/options.c
index e8db07cf..9e95c86a 100644
--- a/options.c
+++ b/options.c
@@ -955,7 +955,7 @@ static struct poptOption long_options[] = {
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
- {"fuzzy", 'y', POPT_ARG_VAL, &fuzzy_basis, 1, 0, 0 },
+ {"fuzzy", 'y', POPT_ARG_NONE, 0, 'y', 0, 0 },
{"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
{"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
{"compress", 'z', POPT_ARG_NONE, 0, 'z', 0, 0 },
@@ -1500,6 +1500,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
verbose++;
break;
+ case 'y':
+ fuzzy_basis++;
+ break;
+
case 'q':
quiet++;
break;
@@ -1845,6 +1849,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
#endif
+ if (fuzzy_basis > 1)
+ fuzzy_basis = basis_dir_cnt + 1;
+
if (protect_args == 1 && am_server)
return 1;
@@ -2342,6 +2349,11 @@ void server_options(char **args, int *argc_p)
argstr[x++] = 'O';
if (omit_link_times)
argstr[x++] = 'J';
+ if (fuzzy_basis) {
+ argstr[x++] = 'y';
+ if (fuzzy_basis > 1)
+ argstr[x++] = 'y';
+ }
} else {
if (copy_links)
argstr[x++] = 'L';
@@ -2680,9 +2692,6 @@ void server_options(char **args, int *argc_p)
if (relative_paths && !implied_dirs && (!am_sender || protocol_version >= 30))
args[ac++] = "--no-implied-dirs";
- if (fuzzy_basis && am_sender)
- args[ac++] = "--fuzzy";
-
if (remove_source_files == 1)
args[ac++] = "--remove-source-files";
else if (remove_source_files)