From 87892f605be16037bc910ca2cf9fa21bb9467f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Gon=C3=A7alves=20Assis?= Date: Sun, 21 Feb 2016 19:59:05 -0300 Subject: [PATCH] merge-recursive: find-renames resets threshold MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the find-renames option follow the behaviour in git-diff, where it resets the threshold when none is given. So, for instance, "--find-renames=25 --find-renames" should result in the default threshold (50%) instead of 25%. Signed-off-by: Felipe Gonçalves Assis Signed-off-by: Junio C Hamano --- merge-recursive.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/merge-recursive.c b/merge-recursive.c index 7bff5be16..b880ae50e 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -2094,8 +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 (!strcmp(s, "find-renames")) + else if (!strcmp(s, "find-renames")) { o->detect_rename = 1; + o->rename_score = 0; + } 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)