Skip to content

Commit 1b47ad1

Browse files
Felipe Gonçalves Assisgitster
authored andcommitted
merge-recursive: more consistent interface
Add strategy option find-renames, following git-diff interface. This makes the option rename-threshold redundant. Signed-off-by: Felipe Gonçalves Assis <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d2b11ec commit 1b47ad1

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Documentation/merge-strategies.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,13 @@ no-renames;;
8585
Turn off rename detection.
8686
See also linkgit:git-diff[1] `--no-renames`.
8787

88+
find-renames[=<n>];;
89+
Turn on rename detection, optionally setting the the similarity
90+
threshold. This is the default.
91+
See also linkgit:git-diff[1] `--find-renames`.
92+
8893
rename-threshold=<n>;;
89-
Controls the similarity threshold used for rename detection.
90-
Re-enables rename detection if disabled by a preceding
91-
`no-renames`.
92-
See also linkgit:git-diff[1] `-M`.
94+
Deprecated synonym for `find-renames=<n>`.
9395

9496
subtree[=<path>];;
9597
This option is a more advanced form of 'subtree' strategy, where

merge-recursive.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2094,7 +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 (skip_prefix(s, "rename-threshold=", &arg)) {
2097+
else if (!strcmp(s, "find-renames"))
2098+
o->detect_rename = 1;
2099+
else if (skip_prefix(s, "find-renames=", &arg) ||
2100+
skip_prefix(s, "rename-threshold=", &arg)) {
20982101
if ((o->rename_score = parse_rename_score(&arg)) == -1 || *arg != 0)
20992102
return -1;
21002103
o->detect_rename = 1;

0 commit comments

Comments
 (0)