From: Ben Peart <peartben@gmail.com>
To: Elijah Newren <newren@palantir.com>
Cc: Ben.Peart@microsoft.com, Johannes.Schindelin@gmx.de,
eckhard.s.maass@googlemail.com, git@vger.kernel.org,
gitster@pobox.com, kewillf@microsoft.com, pclouds@gmail.com,
peff@peff.net, vmiklos@frugalware.org,
Elijah Newren <newren@gmail.com>
Subject: Re:
Date: Mon, 30 Apr 2018 09:11:40 -0400 [thread overview]
Message-ID: <e753d8fd-5329-b819-0076-0ff4659dabf1@gmail.com> (raw)
In-Reply-To: <20180427181937.7607-1-newren@palantir.com>
On 4/27/2018 2:19 PM, Elijah Newren wrote:
> From: Elijah Newren <newren@gmail.com>
>
> On Thu, Apr 26, 2018 at 5:54 PM, Ben Peart <peartben@gmail.com> wrote:
>
>> Can you write the documentation that clearly explains the exact behavior you
>> want? That would kill two birds with one stone... :)
>
> Sure, something like the following is what I envision, and I've tried to
> include the suggestion from Junio to document the copy behavior in the
> merge-recursive documentation.
>
> -- 8< --
> Subject: [PATCH] fixup! merge: Add merge.renames config setting
>
> ---
> Documentation/merge-config.txt | 3 +--
> Documentation/merge-strategies.txt | 5 +++--
> merge-recursive.c | 8 ++++++++
> 3 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/merge-config.txt b/Documentation/merge-config.txt
> index 59848e5634..662c2713ca 100644
> --- a/Documentation/merge-config.txt
> +++ b/Documentation/merge-config.txt
> @@ -41,8 +41,7 @@ merge.renameLimit::
> merge.renames::
> Whether and how Git detects renames. If set to "false",
> rename detection is disabled. If set to "true", basic rename
> - detection is enabled. If set to "copies" or "copy", Git will
> - detect copies, as well. Defaults to the value of diff.renames.
> + detection is enabled. Defaults to the value of diff.renames.
>
> merge.renormalize::
> Tell Git that canonical representation of files in the
> diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt
> index 1e0728aa12..aa66cbe41e 100644
> --- a/Documentation/merge-strategies.txt
> +++ b/Documentation/merge-strategies.txt
> @@ -23,8 +23,9 @@ recursive::
> causing mismerges by tests done on actual merge commits
> taken from Linux 2.6 kernel development history.
> Additionally this can detect and handle merges involving
> - renames. This is the default merge strategy when
> - pulling or merging one branch.
> + renames, but currently cannot make use of detected
> + copies. This is the default merge strategy when pulling
> + or merging one branch.
> +
> The 'recursive' strategy can take the following options:
>
> diff --git a/merge-recursive.c b/merge-recursive.c
> index 6cc4404144..b618f134d2 100644
> --- a/merge-recursive.c
> +++ b/merge-recursive.c
> @@ -564,6 +564,14 @@ static struct string_list *get_renames(struct merge_options *o,
> opts.flags.recursive = 1;
> opts.flags.rename_empty = 0;
> opts.detect_rename = merge_detect_rename(o);
> + /*
> + * We do not have logic to handle the detection of copies. In
> + * fact, it may not even make sense to add such logic: would we
> + * really want a change to a base file to be propagated through
> + * multiple other files by a merge?
> + */
> + if (opts.detect_rename > DIFF_DETECT_RENAME)
> + opts.detect_rename = DIFF_DETECT_RENAME;
> opts.rename_limit = o->merge_rename_limit >= 0 ? o->merge_rename_limit :
> o->diff_rename_limit >= 0 ? o->diff_rename_limit :
> 1000;
>
Thanks Elijah. I've applied this patch and reviewed and tested it. It
works and addresses the concerns around the settings inheritance from
diff.renames. I still _prefer_ the simpler model that doesn't do the
partial inheritance but I can use this model as well.
I'm unsure on the protocol here. Should I incorporate this patch and
submit a reroll or can it just be applied as is?
next prev parent reply other threads:[~2018-04-30 13:11 UTC|newest]
Thread overview: 143+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 13:36 [PATCH v1 0/2] add additional config settings for merge Ben Peart
2018-04-20 13:36 ` [PATCH v1 1/2] merge: Add merge.renames config setting Ben Peart
2018-04-20 17:02 ` Elijah Newren
2018-04-20 17:26 ` Elijah Newren
2018-04-23 12:57 ` Ben Peart
2018-04-20 17:59 ` Ben Peart
2018-04-20 18:34 ` Elijah Newren
2018-04-21 4:23 ` Junio C Hamano
2018-04-23 16:00 ` Ben Peart
2018-04-23 23:23 ` Junio C Hamano
2018-04-24 11:58 ` Johannes Schindelin
2018-04-24 17:47 ` Elijah Newren
2018-04-25 8:20 ` Johannes Schindelin
2018-04-22 12:07 ` Eckhard Maaß
2018-04-23 13:15 ` Ben Peart
2018-04-23 21:32 ` Eckhard Maaß
2018-04-24 16:53 ` Ben Peart
2018-04-23 13:22 ` Ben Peart
2018-04-20 13:36 ` [PATCH v1 2/2] merge: Add merge.aggressive " Ben Peart
2018-04-20 17:22 ` Elijah Newren
2018-04-24 16:45 ` Ben Peart
2018-04-24 17:36 ` Elijah Newren
2018-04-24 23:57 ` Junio C Hamano
2018-04-25 14:47 ` Ben Peart
2018-04-20 17:34 ` [PATCH v1 0/2] add additional config settings for merge Elijah Newren
2018-04-20 18:19 ` Ben Peart
2018-04-24 17:11 ` [PATCH v2 " Ben Peart
2018-04-24 17:11 ` [PATCH v2 1/2] merge: Add merge.renames config setting Ben Peart
2018-04-24 18:11 ` Elijah Newren
2018-04-24 18:59 ` Elijah Newren
2018-04-24 20:31 ` Ben Peart
2018-04-25 16:01 ` Elijah Newren
2018-04-24 17:11 ` [PATCH v2 2/2] merge: Add merge.aggressive " Ben Peart
2018-04-25 0:13 ` [PATCH v2 0/2] add additional config settings for merge Junio C Hamano
2018-04-25 15:22 ` Ben Peart
2018-04-26 1:48 ` Junio C Hamano
2018-04-26 20:52 ` [PATCH v3 0/3] add merge.renames config setting Ben Peart
2018-04-26 20:52 ` [PATCH v3 1/3] merge: update documentation for {merge,diff}.renameLimit Ben Peart
2018-04-26 23:11 ` Elijah Newren
2018-04-26 23:23 ` Jonathan Tan
2018-04-26 20:52 ` [PATCH v3 2/3] merge: Add merge.renames config setting Ben Peart
2018-04-26 22:52 ` Elijah Newren
2018-04-27 0:54 ` Ben Peart
2018-04-27 2:23 ` Junio C Hamano
2018-04-27 3:28 ` Elijah Newren
2018-04-27 7:23 ` Johannes Schindelin
2018-04-27 14:32 ` Elijah Newren
2018-04-27 18:37 ` Eckhard Maaß
2018-04-27 20:23 ` Elijah Newren
2018-04-30 8:03 ` Eckhard Maaß
2018-04-30 16:54 ` Elijah Newren
2018-04-27 4:17 ` Elijah Newren
2018-04-27 18:19 ` Elijah Newren
2018-04-30 13:11 ` Ben Peart [this message]
2018-04-30 16:12 ` Elijah Newren
2018-05-02 14:33 ` Re: Ben Peart
2018-04-26 20:52 ` [PATCH v3 3/3] merge: pass aggressive when rename detection is turned off Ben Peart
2018-04-26 23:00 ` Elijah Newren
2018-04-26 22:08 ` [PATCH v3 0/3] add merge.renames config setting Elijah Newren
2018-05-02 16:01 ` [PATCH v4 0/3] add additional config settings for merge Ben Peart
2018-05-02 16:01 ` [PATCH v4 1/3] merge: update documentation for {merge,diff}.renameLimit Ben Peart
2018-05-02 16:01 ` [PATCH v4 2/3] merge: Add merge.renames config setting Ben Peart
2018-05-04 3:07 ` Junio C Hamano
2018-05-02 16:01 ` [PATCH v4 3/3] merge: pass aggressive when rename detection is turned off Ben Peart
2018-05-02 17:20 ` [PATCH v4 0/3] add additional config settings for merge Elijah Newren
[not found] <TXJgqLzlM6oCfTXKSqrSBk@txt.att.net>
2023-08-09 5:12 ` Luna Jernberg
[not found] <20220301070226.2477769-1-jaydeepjd.8914>
2022-03-06 11:10 ` Jaydeep P Das
2022-03-06 11:22 ` Jaydeep Das
-- strict thread matches above, loose matches on Subject: below --
2021-08-21 14:40 TECOB270_Ganesh Pawar
2021-08-21 23:52 ` Jeff King
2019-11-15 16:03 Martin Nicolay
2019-11-15 16:29 ` Martin Ågren
2019-11-15 16:37 ` Re: Martin Ågren
2019-08-20 17:23 William Baker
2019-08-20 17:27 ` Yagnatinsky, Mark
2019-03-05 14:57 [GSoC][PATCH v2 3/3] t3600: use helpers to replace test -d/f/e/s <path> Eric Sunshine
2019-03-05 23:38 ` Rohit Ashiwal
2019-01-23 10:50 Christopher Hagler
2019-01-23 14:16 ` Cody Kratzer
2019-01-23 14:25 ` Re: Thomas Braun
2019-01-23 16:00 ` Re: Christopher Hagler
2019-01-23 16:35 ` Randall S. Becker
2019-01-24 17:11 ` Johannes Schindelin
2018-10-08 13:33 Netravnen
2018-10-08 13:34 ` Inderpreet Saini
2018-02-27 1:18 Alan Gage
2018-02-27 10:26 ` René Scharfe
2017-11-20 15:10 Viet Nguyen
2017-11-20 20:07 ` Stefan Beller
2017-11-12 2:21 hsed
2017-11-13 18:56 ` Stefan Beller
2017-01-25 0:11 [PATCH 7/7] completion: recognize more long-options Cornelius Weig
2017-01-25 0:21 ` Stefan Beller
2017-01-25 0:43 ` Cornelius Weig
2017-01-25 0:52 ` Re: Stefan Beller
2017-01-25 0:54 ` Re: Linus Torvalds
2017-01-25 1:32 ` Re: Eric Wong
2016-04-11 19:04 (unknown), miwilliams
2016-04-12 4:33 ` Stefan Beller
2015-08-19 19:41 Re: christain147
2015-08-19 11:09 Re: christain147
2015-08-05 12:47 (unknown) Ivan Chernyavsky
2015-08-15 9:19 ` Duy Nguyen
2015-08-17 17:49 ` Re: Junio C Hamano
2015-04-08 20:44 (unknown), Mamta Upadhyay
2015-04-08 21:58 ` Thomas Braun
2015-04-09 11:27 ` Re: Konstantin Khomoutov
[not found] <CANSxx61FaNp5SBXJ8Y+pWn0eDcunmibKR5g8rttnWGdGwEMHCA@mail.gmail.com>
2015-03-18 20:45 ` Re: Junio C Hamano
2015-03-18 21:06 ` Re: Stefan Beller
2015-03-18 21:17 ` Re: Jeff King
2015-03-18 21:28 ` Re: Jeff King
2015-03-18 21:33 ` Re: Junio C Hamano
2015-03-18 21:45 ` Re: Stefan Beller
2015-03-13 1:34 (unknown) cody.taylor
2015-03-13 2:00 ` Duy Nguyen
2014-09-08 11:36 (unknown), R. Klomp
[not found] ` <CAOqJoqGSRUw_UT4LhqpYX-WX6AEd2ReAWjgNS76Cra-SMKw3NQ@mail.gmail.com>
2014-09-08 14:36 ` R. Klomp
2014-09-10 0:00 ` Re: David Aguilar
2014-09-15 15:10 ` Re: R. Klomp
2014-02-06 11:54 "Sparse checkout leaves no entry on working directory" all the time on Windows 7 on Git 1.8.5.2.msysgit.0 konstunn
2014-02-06 13:20 ` Johannes Sixt
2014-02-06 19:56 ` Constantine Gorbunov
2012-06-12 21:12 (unknown), rohit sood
2012-06-12 23:51 ` Erik Faye-Lund
2009-11-18 5:03 Re: Anna
2009-05-11 18:57 (unknown) Don Slutz
2009-05-11 20:48 ` Johannes Schindelin
2009-05-12 12:45 ` Re: Don Slutz
2009-05-07 17:01 (unknown), Bevan Watkiss
2009-05-07 17:13 ` Alex Riesen
2009-05-07 17:26 ` Bevan Watkiss
2009-05-07 18:18 ` Alex Riesen
2009-05-07 18:48 ` Bevan Watkiss
2009-05-07 19:56 ` Björn Steinbrink
2009-05-07 18:56 ` Linus Torvalds
2009-05-07 19:37 ` RE: Bevan Watkiss
2009-05-07 20:07 ` RE: Linus Torvalds
2009-05-07 20:20 ` RE: Linus Torvalds
2009-05-07 20:43 ` Junio C Hamano
2009-05-07 21:33 ` Re: Linus Torvalds
2009-05-07 21:55 ` Linus Torvalds
2009-05-07 22:27 ` RE: david
2009-05-07 22:36 ` RE: Linus Torvalds
2009-05-07 22:43 ` RE: david
2009-05-07 23:00 ` RE: Linus Torvalds
2009-05-07 23:07 ` RE: david
2009-05-07 23:18 ` RE: Linus Torvalds
2009-05-07 23:31 ` RE: david
2009-05-07 23:57 ` Johan Herland
2009-05-08 16:14 ` Bevan Watkiss
2009-05-08 8:17 ` Alex Riesen
2009-05-08 14:39 ` Re: Linus Torvalds
2009-05-08 15:51 ` Re: Brandon Casey
2009-05-08 16:15 ` Re: Linus Torvalds
2009-05-08 17:27 ` Re: Brandon Casey
2009-05-08 17:43 ` Re: Brandon Casey
2009-05-08 21:49 ` Re: Linus Torvalds
2009-05-08 23:04 ` Re: Brandon Casey
2009-05-09 16:44 ` Re: Linus Torvalds
2009-05-08 17:44 ` Re: Linus Torvalds
2009-03-30 5:03 (unknown), David Aguilar
2009-03-30 7:02 ` Markus Heidelberg
2009-03-30 8:46 ` Re: Junio C Hamano
2007-11-01 20:44 (unknown), Francesco Pretto
2007-11-01 20:48 ` Francesco Pretto
2006-02-02 0:39 [RFC & PATCH] Solaris 8: ENOSYS when mkdir applied to automount., Jason Riedy
2006-02-02 4:18 ` H. Peter Anvin
2005-04-22 22:19 (unknown), atani
2005-04-22 23:16 ` Martin Schlemmer
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e753d8fd-5329-b819-0076-0ff4659dabf1@gmail.com \
--to=peartben@gmail.com \
--cc=Ben.Peart@microsoft.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=eckhard.s.maass@googlemail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kewillf@microsoft.com \
--cc=newren@gmail.com \
--cc=newren@palantir.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=vmiklos@frugalware.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).