summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-10-26 21:54:04 -0700
committerJunio C Hamano <gitster@pobox.com>2010-10-26 21:54:04 -0700
commit329351feeb0c08c835ac4ff05f127fbfe42a78cf (patch)
tree9c6d18cb13544077b05783defd525c7440d7bc68 /merge-recursive.c
parent9b1054d93e7e8564d0d9865cb7118cb6e756c74b (diff)
parent37ab5156ae31ec81e3489406f23be6936a2a370c (diff)
downloadgit-329351feeb0c08c835ac4ff05f127fbfe42a78cf.tar.gz
Merge branch 'kb/merge-recursive-rename-threshold'
* kb/merge-recursive-rename-threshold: diff: add synonyms for -M, -C, -B merge-recursive: option to specify rename threshold Conflicts: Documentation/diff-options.txt Documentation/merge-strategies.txt
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 325a97bf31..875859f68e 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -334,6 +334,7 @@ static struct string_list *get_renames(struct merge_options *o,
opts.rename_limit = o->merge_rename_limit >= 0 ? o->merge_rename_limit :
o->diff_rename_limit >= 0 ? o->diff_rename_limit :
500;
+ opts.rename_score = o->rename_score;
opts.warn_on_too_large_rename = 1;
opts.output_format = DIFF_FORMAT_NO_OUTPUT;
if (diff_setup_done(&opts) < 0)
@@ -1576,6 +1577,11 @@ int parse_merge_opt(struct merge_options *o, const char *s)
o->renormalize = 1;
else if (!strcmp(s, "no-renormalize"))
o->renormalize = 0;
+ else if (!prefixcmp(s, "rename-threshold=")) {
+ const char *score = s + strlen("rename-threshold=");
+ if ((o->rename_score = parse_rename_score(&score)) == -1 || *score != 0)
+ return -1;
+ }
else
return -1;
return 0;