Skip to content

Commit 87892f6

Browse files
Felipe Gonçalves Assisgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 83837ec commit 87892f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

merge-recursive.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2094,8 +2094,10 @@ int parse_merge_opt(struct merge_options *o, const char *s)
20942094
o->renormalize = 0;
20952095
else if (!strcmp(s, "no-renames"))
20962096
o->detect_rename = 0;
2097-
else if (!strcmp(s, "find-renames"))
2097+
else if (!strcmp(s, "find-renames")) {
20982098
o->detect_rename = 1;
2099+
o->rename_score = 0;
2100+
}
20992101
else if (skip_prefix(s, "find-renames=", &arg) ||
21002102
skip_prefix(s, "rename-threshold=", &arg)) {
21012103
if ((o->rename_score = parse_rename_score(&arg)) == -1 || *arg != 0)

0 commit comments

Comments
 (0)