git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v1 1/2] merge: Add merge.renames config setting

From
Ben Peart <peartben@gmail.com>
Date
Apr 23, 2018, 13:22 UTC
Message-ID
<1e57021a-2a99-c3a7-f203-e3c9b0546876@gmail.com>
In-Reply-To
<CABPp-BFqj2TFiHUDsysafq0NHC4MV-QYZVxOZe1TNRrXMOQfng@mail.gmail.com>
On 4/20/2018 2:34 PM, Elijah Newren wrote:
Show 48 quoted lines
> Hi Ben,
> 
> On Fri, Apr 20, 2018 at 10:59 AM, Ben Peart <peartben@gmail.com> wrote:
>>
>> On 4/20/2018 1:02 PM, Elijah Newren wrote:
>>>
>>> On Fri, Apr 20, 2018 at 6:36 AM, Ben Peart <Ben.Peart@microsoft.com>
>>> wrote:
>>>>
>>>> --- a/Documentation/merge-config.txt
>>>> +++ b/Documentation/merge-config.txt
>>>> @@ -37,6 +37,11 @@ merge.renameLimit::
>>>>           during a merge; if not specified, defaults to the value of
>>>>           diff.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. This is the default.
>>>
>>>
>>> One can already control o->detect_rename via the -Xno-renames and
>>> -Xfind-renames options.
> 
> This statement wasn't meant to be independent of the sentence that
> followed it...
> 
>> Yes, but that requires people to know they need to do that and then remember
>> to pass it on the command line every time.  We've found that doesn't
>> typically happen, we just get someone complaining about slow merges. :)
>>
>> That is why we added them as config options which change the default. That
>> way we can then set them on the repo and the default behavior gives them
>> better performance.  They can still always override the config setting with
>> the command line options.
> 
> Sorry, I think I wasn't being clear.  The documentation for the config
> options for e.g. diff.renameLimit, fetch.prune, log.abbrevCommit, and
> merge.ff all mention the equivalent command line parameters.  Your
> patch doesn't do that for merge.renames, but I think it would be
> helpful if it did.
> 
> Also, a link in the documentation the other way, from
> Documentation/merge-strategies.txt under the entries for -Xno-renames
> and -Xfind-renames should probably mention this new merge.renames
> config setting (much like the -Xno-renormalize flag mentions the
> merge.renomralize config option).
> 

I'm all in favor of having more information in the documentation. I'm of the opinion that if someone has made the effort to actually _read_ the documentation, we should be as descriptive and complete as possible.

I'll take a cut at adding the things you have pointed out would be helpful.
Show 11 quoted lines
> I agree that's the pre-existing behavior, but prior to this patch
> turning off rename detection could only be done manually with every
> invocation.  I'm slightly concerned that users might be confused if
> merge.renames was set to false somewhere -- perhaps even in a global
> /etc/gitconfig that they had no knowledge of or control over -- and in
> an attempt to get rename detection to work they started passing larger
> and larger values for renameLimit all to no avail.
> 
> The easy fix here may just be documenting the diff.renameLimit and
> merge.renameLimit options that they have no effect if rename detection
> is turned off.

I can add this additional documentation as well. While some might think it is stating the obvious, I'm sure someone will benefit from it being explicitly called out.

Show 5 quoted lines
> 
> Or maybe I'm just worrying too much, but we (folks at $dayjob) were
> bit pretty hard by renameLimit silently being capped at a value less
> than the user specified and in a way that wasn't documented anywhere.
> 
Previous: Ben PeartNext: Ben Peart
Message 18 of 65 in “add additional config settings for merge”
  1. 0/2 add additional config settings for mergeBen Peart, Apr 20, 2018
  2. 1/2 merge: Add merge.renames config settingBen Peart, Apr 20, 2018
  3. Elijah NewrenApr 20, 2018
  4. Elijah NewrenApr 20, 2018
  5. Ben PeartApr 23, 2018
  6. Ben PeartApr 20, 2018
  7. Elijah NewrenApr 20, 2018
  8. Junio C HamanoApr 21, 2018
  9. Ben PeartApr 23, 2018
  10. Junio C HamanoApr 23, 2018
  11. Johannes SchindelinApr 24, 2018
  12. Elijah NewrenApr 24, 2018
  13. Johannes SchindelinApr 25, 2018
  14. Eckhard MaaßApr 22, 2018
  15. Ben PeartApr 23, 2018
  16. Eckhard MaaßApr 23, 2018
  17. Ben PeartApr 24, 2018
  18. Ben PeartApr 23, 2018
  19. 2/2 merge: Add merge.aggressive config settingBen Peart, Apr 20, 2018
  20. Elijah NewrenApr 20, 2018
  21. Ben PeartApr 24, 2018
  22. Elijah NewrenApr 24, 2018
  23. Junio C HamanoApr 24, 2018
  24. Ben PeartApr 25, 2018
  25. Elijah NewrenApr 20, 2018
  26. Ben PeartApr 20, 2018
  27. 0/2 add additional config settings for mergeBen Peart, Apr 24, 2018
  28. 1/2 merge: Add merge.renames config settingBen Peart, Apr 24, 2018
  29. Elijah NewrenApr 24, 2018
  30. Elijah NewrenApr 24, 2018
  31. Ben PeartApr 24, 2018
  32. Elijah NewrenApr 25, 2018
  33. 2/2 merge: Add merge.aggressive config settingBen Peart, Apr 24, 2018
  34. Junio C HamanoApr 25, 2018
  35. Ben PeartApr 25, 2018
  36. Junio C HamanoApr 26, 2018
  37. 0/3 add merge.renames config settingBen Peart, Apr 26, 2018
  38. 1/3 merge: update documentation for {merge,diff}.renameLimitBen Peart, Apr 26, 2018
  39. Elijah NewrenApr 26, 2018
  40. Jonathan TanApr 26, 2018
  41. 2/3 merge: Add merge.renames config settingBen Peart, Apr 26, 2018
  42. Elijah NewrenApr 26, 2018
  43. Ben PeartApr 27, 2018
  44. Junio C HamanoApr 27, 2018
  45. Elijah NewrenApr 27, 2018
  46. Johannes SchindelinApr 27, 2018
  47. Elijah NewrenApr 27, 2018
  48. Eckhard MaaßApr 27, 2018
  49. Elijah NewrenApr 27, 2018
  50. Eckhard MaaßApr 30, 2018
  51. Elijah NewrenApr 30, 2018
  52. Elijah NewrenApr 27, 2018
  53. Elijah Newren, Apr 27, 2018
  54. Ben PeartApr 30, 2018
  55. Elijah NewrenApr 30, 2018
  56. Ben PeartMay 2, 2018
  57. 3/3 merge: pass aggressive when rename detection is turned offBen Peart, Apr 26, 2018
  58. Elijah NewrenApr 26, 2018
  59. Elijah NewrenApr 26, 2018
  60. 0/3 add additional config settings for mergeBen Peart, May 2, 2018
  61. 1/3 merge: update documentation for {merge,diff}.renameLimitBen Peart, May 2, 2018
  62. 2/3 merge: Add merge.renames config settingBen Peart, May 2, 2018
  63. Junio C HamanoMay 4, 2018
  64. 3/3 merge: pass aggressive when rename detection is turned offBen Peart, May 2, 2018
  65. Elijah NewrenMay 2, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.