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 1/5] merge-recursive: find-renames resets threshold
Date: Sun, 21 Feb 2016 12:09:14 -0300 [thread overview]
Message-ID: <1456067358-19781-2-git-send-email-felipegassis@gmail.com> (raw)
In-Reply-To: <1456067358-19781-1-git-send-email-felipegassis@gmail.com>
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>
---
merge-recursive.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index 7bff5be..b880ae5 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -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)
--
2.7.1.492.gc9722f8
next prev parent reply other threads:[~2016-02-21 18:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-21 15:09 [PATCH 0/5] Tests and fixes for merge-recursive rename options Felipe Gonçalves Assis
2016-02-21 15:09 ` Felipe Gonçalves Assis [this message]
2016-02-21 17:18 ` [PATCH 1/5] merge-recursive: find-renames resets threshold Eric Sunshine
2016-02-21 15:09 ` [PATCH 2/5] merge-strategies.txt: fix typo Felipe Gonçalves Assis
2016-02-21 17:21 ` Eric Sunshine
2016-02-21 15:09 ` [PATCH 3/5] merge-recursive: test rename threshold option Felipe Gonçalves Assis
2016-02-21 17:52 ` Eric Sunshine
2016-02-21 18:55 ` Felipe Gonçalves Assis
2016-02-21 20:45 ` Eric Sunshine
2016-02-21 23:15 ` Junio C Hamano
2016-02-21 15:09 ` [PATCH 4/5] merge-recursive: test option to disable renames Felipe Gonçalves Assis
2016-02-21 18:01 ` Eric Sunshine
2016-02-21 15:09 ` [PATCH 5/5] merge-recursive: test more consistent interface Felipe Gonçalves Assis
2016-02-21 18:40 ` Eric Sunshine
2016-02-21 19:55 ` Felipe Gonçalves Assis
2016-02-21 20:32 ` Eric Sunshine
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=1456067358-19781-2-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).