From: "Felipe Gonçalves Assis" <felipeg.assis@gmail.com>
To: git@vger.kernel.org
Cc: Johannes.Schindelin@gmx.de, gitster@pobox.com,
sunshine@sunshineco.com,
"Felipe Gonçalves Assis" <felipegassis@gmail.com>
Subject: [PATCH v4 2/2] merge-recursive: more consistent interface
Date: Wed, 17 Feb 2016 01:15:26 -0200 [thread overview]
Message-ID: <1455678926-15105-3-git-send-email-felipegassis@gmail.com> (raw)
In-Reply-To: <1455678926-15105-1-git-send-email-felipegassis@gmail.com>
Add strategy option find-renames, following git-diff interface. This
makes the option rename-threshold redundant.
Signed-off-by: Felipe Gonçalves Assis <felipegassis@gmail.com>
---
Documentation/merge-strategies.txt | 10 ++++++----
merge-recursive.c | 5 ++++-
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt
index 1a5e197..ff359b6 100644
--- a/Documentation/merge-strategies.txt
+++ b/Documentation/merge-strategies.txt
@@ -85,11 +85,13 @@ no-renames;;
Turn off rename detection.
See also linkgit:git-diff[1] `--no-renames`.
+find-renames[=<n>];;
+ Turn on rename detection, optionally setting the the similarity
+ threshold. This is the default.
+ See also linkgit:git-diff[1] `--find-renames`.
+
rename-threshold=<n>;;
- Controls the similarity threshold used for rename detection.
- Re-enables rename detection if disabled by a preceding
- `no-renames`.
- See also linkgit:git-diff[1] `-M`.
+ Deprecated synonym for `find-renames=<n>`.
subtree[=<path>];;
This option is a more advanced form of 'subtree' strategy, where
diff --git a/merge-recursive.c b/merge-recursive.c
index 6dd0a11..700febd 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -2094,7 +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 (skip_prefix(s, "rename-threshold=", &arg)) {
+ else if (!strcmp(s, "find-renames"))
+ o->detect_rename = 1;
+ 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)
return -1;
o->detect_rename = 1;
--
2.7.1.289.ga0c045c
prev parent reply other threads:[~2016-02-17 3:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 3:15 [PATCH v4 0/2] merge-recursive: option to disable renames Felipe Gonçalves Assis
2016-02-17 3:15 ` [PATCH v4 1/2] " Felipe Gonçalves Assis
2016-02-17 3:15 ` Felipe Gonçalves Assis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455678926-15105-3-git-send-email-felipegassis@gmail.com \
--to=felipeg.assis@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=felipegassis@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).