From 1b47ad160b55f50a7a98c180e18d80f0f8f17a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Gon=C3=A7alves=20Assis?= Date: Wed, 17 Feb 2016 01:15:26 -0200 Subject: merge-recursive: more consistent interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add strategy option find-renames, following git-diff interface. This makes the option rename-threshold redundant. Signed-off-by: Felipe Gonçalves Assis Signed-off-by: Junio C Hamano diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt index 1a5e197..ff359b6 100644 --- a/Documentation/merge-strategies.txt +++ b/Documentation/merge-strategies.txt @@ -85,11 +85,13 @@ no-renames;; Turn off rename detection. See also linkgit:git-diff[1] `--no-renames`. +find-renames[=];; + Turn on rename detection, optionally setting the the similarity + threshold. This is the default. + See also linkgit:git-diff[1] `--find-renames`. + rename-threshold=;; - Controls the similarity threshold used for rename detection. - Re-enables rename detection if disabled by a preceding - `no-renames`. - See also linkgit:git-diff[1] `-M`. + Deprecated synonym for `find-renames=`. subtree[=];; This option is a more advanced form of 'subtree' strategy, where diff --git a/merge-recursive.c b/merge-recursive.c index 6dd0a11..7bff5be 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -2094,7 +2094,10 @@ int parse_merge_opt(struct merge_options *o, const char *s) o->renormalize = 0; else if (!strcmp(s, "no-renames")) o->detect_rename = 0; - else if (skip_prefix(s, "rename-threshold=", &arg)) { + else if (!strcmp(s, "find-renames")) + o->detect_rename = 1; + else if (skip_prefix(s, "find-renames=", &arg) || + skip_prefix(s, "rename-threshold=", &arg)) { if ((o->rename_score = parse_rename_score(&arg)) == -1 || *arg != 0) return -1; o->detect_rename = 1; -- cgit v0.10.2-6-g49f6