Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
merge-recursive: find-renames resets threshold
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 <felipegassis@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Felipe Gonçalves Assis authored and Junio C Hamano committed Feb 24, 2016
1 parent 83837ec commit 87892f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion merge-recursive.c
Expand Up @@ -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)
Expand Down

0 comments on commit 87892f6

Please sign in to comment.