X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/51bc0e8954bdeb4314d3792352179be64f4a8fe8..7c4c2959ae79a01986ff24b5dc9ff4518cc9fb7b:/detect-renamed-lax.diff diff --git a/detect-renamed-lax.diff b/detect-renamed-lax.diff index 66cb788..98a732a 100644 --- a/detect-renamed-lax.diff +++ b/detect-renamed-lax.diff @@ -33,7 +33,7 @@ switches to --detect-moved blindly accepts the staged file. diff = u_strcmp(fmid->basename, f->basename); if (diff == 0) { good_match = mid; -@@ -1826,6 +1828,21 @@ static void recv_generator(char *fname, +@@ -1831,6 +1833,21 @@ static void recv_generator(char *fname, fnamecmp = partialptr; fnamecmp_type = FNAMECMP_PARTIAL_DIR; statret = 0; @@ -77,23 +77,23 @@ switches to --detect-moved blindly accepts the staged file. {"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 }, {"compress", 'z', POPT_ARG_NONE, 0, 'z', 0, 0 }, {"no-compress", 0, POPT_ARG_VAL, &do_compression, 0, 0, 0 }, -@@ -1895,8 +1899,14 @@ void server_options(char **args, int *ar - } - } - /* Both sides need to know in case this disables incremental recursion. */ -- if (detect_renamed) -- args[ac++] = "--detect-renamed"; -+ if (detect_renamed) { -+ if (detect_renamed == 1) -+ args[ac++] = "--detect-renamed"; -+ else if (detect_renamed == 2) -+ args[ac++] = "--detect-renamed-lax"; -+ else -+ args[ac++] = "--detect-moved"; -+ } - - if (modify_window_set) { - if (asprintf(&arg, "--modify-window=%d", modify_window) < 0) +@@ -1889,8 +1893,14 @@ void server_options(char **args, int *ar + args[ac++] = "--super"; + if (size_only) + args[ac++] = "--size-only"; +- if (detect_renamed) +- args[ac++] = "--detect-renamed"; ++ if (detect_renamed) { ++ if (detect_renamed == 1) ++ args[ac++] = "--detect-renamed"; ++ else if (detect_renamed == 2) ++ args[ac++] = "--detect-renamed-lax"; ++ else ++ args[ac++] = "--detect-moved"; ++ } + } else { + if (skip_compress) { + if (asprintf(&arg, "--skip-compress=%s", skip_compress) < 0) --- old/rsync.yo +++ new/rsync.yo @@ -385,6 +385,8 @@ to the detailed description below for a