Hi, On Thu, 26 Apr 2018, Elijah Newren wrote: > On Thu, Apr 26, 2018 at 7:23 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > > Ben Peart <peartben@xxxxxxxxx> writes: > > > >> Color me puzzled. :) The consensus was that the default value for > >> merge.renames come from diff.renames. diff.renames supports copy > >> detection which means that merge.renames will inherit that value. My > >> assumption was that is what was intended so when I reimplemented it, I > >> fully implemented it that way. > >> > >> Are you now requesting to only use diff.renames as the default if the > >> value is true or false but not if it is copy? What should happen if > >> diff.renames is actually set to copy? Should merge silently change > >> that to true, display a warning, error out, or something else? Do you > >> have some other behavior for how to handle copy being inherited from > >> diff.renames you'd like to see? > >> > >> Can you write the documentation that clearly explains the exact > >> behavior you want? That would kill two birds with one stone... :) > > > > I think demoting from copy to rename-only is a good idea, at least > > for now, because I do not believe we have figured out what we want > > to happen when we detect copied files are involved in a merge. > > > > But I am not sure if we even want to fail merge.renames=copy as an > > invalid configuration. So my gut feeling of the best solution to > > the above is to do something like: > > > > - whether the configuration comes from diff.renames or > > merge.renames, turn *.renames=copy to true inside the merge > > recursive machinery. > > > > - document the fact in "git merge-recursive" documentation (or "git > > merge" documentation) to say "_currently_ asking for rename > > detection to find copies and renames will do the same > > thing---copies are ignored", impliying "this might change in the > > future", in the BUGS section. > > Yes, I agree. Guys, you argued long and hard that one config setting (diff.renames) should magically imply another one (merge.renames), on the basis that they essentially do the same. And now you are suggesting that they *cannot* be essentially the same? Are you agreeing on such a violation of the Law of Least Surprise? Please, make up your mind. Inheriting merge.renames from diff.renames is "magic" enough to be puzzling. Introducing that auto-demoting is just simply creating a bad user experience. Please don't. It is fine, of course, to admit at this stage that the whole magic idea of letting merge.renames inherit from diff.renames was only half thought through (we're in reviewing stage right now for the purpose of weighing alternative approaches and trying to come up with the best solution after all) and that we should go with Ben's original approach, which has the rather huge and dramatic advantage of being very, very clear and easy to understand to the user. We could even document that (and why) the 'copy' value in merge.renames is not allowed for the time being. Ciao, Dscho