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

Re: [PATCH v3 02/13] Documentation/technical: describe remembering renames optimization

From
Elijah Newren <newren@gmail.com>
Date
May 20, 2021, 16:34 UTC
Message-ID
<CABPp-BE5WdFTuOYG1Lw8_XmTg==KqbY5UHK91FVdM3fFRM5uvQ@mail.gmail.com>
In-Reply-To
<ef450bbd-0cbb-a512-d88e-eca6638358aa@gmail.com>
On Thu, May 20, 2021 at 4:32 AM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
Show 33 quoted lines
>
> On 20/05/21 13.09, Elijah Newren via GitGitGadget wrote:
> > +Outline:
> > +
> > +  0. Assumptions
> > +
> > +  1. How rebasing and cherry-picking work
> > +
> > +  2. Why the renames on MERGE_SIDE1 in any given pick are *always* a
> > +     superset of the renames on MERGE_SIDE1 for the next pick.
> > +
> > +  3. Why any rename on MERGE_SIDE1 in any given pick is _almost_ always also
> > +     a rename on MERGE_SIDE1 for the next pick
> > +
> > +  4. A detailed description of the the counter-examples to #3.
> > +
> > +  5. Why the special cases in #4 are still fully reasonable to use to pair
> > +     up files for three-way content merging in the merge machinery, and why
> > +     they do not affect the correctness of the merge.
> > +
> > +  6. Interaction with skipping of "irrelevant" renames
> > +
> > +  7. Additional items that need to be cached
> > +
> > +  8. How directory rename detection interacts with the above and why this
> > +     optimization is still safe even if merge.directoryRenames is set to
> > +     "true".
> > +
> > +
>
> For item 1, 2, 3, 5, 8, it seems that you form question sentences but ended
> with dot, instead of question mark (?). Are these question sentences or
> descriptive sentences?

I should probably just leave off the ending punctuation on all of these (looks like I goofed on items 2, 4, 5, and 8), since these are headings and not full sentences. For example, item 1 is "Here is a description of how rebasing and cherry-picking work". Titles are often just sentence fragments because they're trying to be concise while highlighting some kind of summary of what their section/chapter/part/whatever contains.

Show 12 quoted lines
> > +=== 0. Assumptions ===
> > +
> > +There are two assumptions that will hold throughout this document:
> > +
> > +  * The upstream side where commits are transplanted to is treated as the
> > +    first parent side when rebase/cherry-pick call the merge machinery
> > +
> > +  * All merges are fully automatic
> > +
>
> Did you mean that "fully automatic" merges are merges that can be done
> without conflicts?

No, as stated below when I explain that assumption, I mean "there is no interruption for a user to resolve conflicts or to just further edit or tweak files". The fact that a merge can be done without conflicts isn't enough, the user also needs to not interrupt the process (as in using 'edit' in an interactive rebase) as well.

Previous: Kerry, RichardNext: Elijah Newren via GitGitGadget
Message 49 of 61 in “Optimization batch 11: avoid repeatedly detecting same renames”
  1. 0/7 Optimization batch 11: avoid repeatedly detecting same renamesElijah Newren via GitGitGadget, Mar 24, 2021
  2. 2/7 merge-ort: populate caches of rename detection resultsElijah Newren via GitGitGadget, Mar 24, 2021
  3. 1/7 merge-ort: add data structures for in-memory caching of rename detectionElijah Newren via GitGitGadget, Mar 24, 2021
  4. 4/7 merge-ort: avoid accidental API mis-useElijah Newren via GitGitGadget, Mar 24, 2021
  5. 3/7 merge-ort: add code to check for whether cached renames can be reusedElijah Newren via GitGitGadget, Mar 24, 2021
  6. 5/7 merge-ort: preserve cached renames for the appropriate sideElijah Newren via GitGitGadget, Mar 24, 2021
  7. 6/7 merge-ort: add helper functions for using cached renamesElijah Newren via GitGitGadget, Mar 24, 2021
  8. 7/7 merge-ort, diffcore-rename: employ cached renames when possibleElijah Newren via GitGitGadget, Mar 24, 2021
  9. Junio C HamanoMar 24, 2021
  10. Elijah NewrenMar 24, 2021
  11. Junio C HamanoMar 25, 2021
  12. Elijah NewrenMar 29, 2021
  13. Derrick StoleeMar 30, 2021
  14. 00/13 Optimization batch 11: avoid repeatedly detecting same renamesElijah Newren via GitGitGadget, May 4, 2021
  15. 01/13 t6423: rename file within directory that other side renamedElijah Newren via GitGitGadget, May 4, 2021
  16. 03/13 fast-rebase: change assert() to BUG()Elijah Newren via GitGitGadget, May 4, 2021
  17. 04/13 fast-rebase: write conflict state to working tree, index, and HEADElijah Newren via GitGitGadget, May 4, 2021
  18. Derrick StoleeMay 17, 2021
  19. Elijah NewrenMay 18, 2021
  20. Derrick StoleeMay 18, 2021
  21. 02/13 Documentation/technical: describe remembering renames optimizationElijah Newren via GitGitGadget, May 4, 2021
  22. 07/13 merge-ort: populate caches of rename detection resultsElijah Newren via GitGitGadget, May 4, 2021
  23. Derrick StoleeMay 17, 2021
  24. Elijah NewrenMay 20, 2021
  25. 06/13 merge-ort: add data structures for in-memory caching of rename detectionElijah Newren via GitGitGadget, May 4, 2021
  26. Derrick StoleeMay 17, 2021
  27. Elijah NewrenMay 18, 2021
  28. Derrick StoleeMay 18, 2021
  29. 05/13 t6429: testcases for remembering renamesElijah Newren via GitGitGadget, May 4, 2021
  30. 08/13 merge-ort: add code to check for whether cached renames can be reusedElijah Newren via GitGitGadget, May 4, 2021
  31. Derrick StoleeMay 17, 2021
  32. 10/13 merge-ort: preserve cached renames for the appropriate sideElijah Newren via GitGitGadget, May 4, 2021
  33. 11/13 merge-ort: add helper functions for using cached renamesElijah Newren via GitGitGadget, May 4, 2021
  34. 12/13 merge-ort: handle interactions of caching and rename/rename(1to1) casesElijah Newren via GitGitGadget, May 4, 2021
  35. Derrick StoleeMay 17, 2021
  36. 13/13 merge-ort, diffcore-rename: employ cached renames when possibleElijah Newren via GitGitGadget, May 4, 2021
  37. Derrick StoleeMay 17, 2021
  38. Elijah NewrenMay 20, 2021
  39. Derrick StoleeMay 22, 2021
  40. 09/13 merge-ort: avoid accidental API mis-useElijah Newren via GitGitGadget, May 4, 2021
  41. Derrick StoleeMay 17, 2021
  42. Elijah NewrenMay 14, 2021
  43. Derrick StoleeMay 14, 2021
  44. 00/13 Optimization batch 11: avoid repeatedly detecting same renamesElijah Newren via GitGitGadget, May 20, 2021
  45. 01/13 t6423: rename file within directory that other side renamedElijah Newren via GitGitGadget, May 20, 2021
  46. 02/13 Documentation/technical: describe remembering renames optimizationElijah Newren via GitGitGadget, May 20, 2021
  47. Bagas SanjayaMay 20, 2021
  48. Kerry, RichardMay 20, 2021
  49. Elijah NewrenMay 20, 2021
  50. 03/13 fast-rebase: change assert() to BUG()Elijah Newren via GitGitGadget, May 20, 2021
  51. 04/13 fast-rebase: write conflict state to working tree, index, and HEADElijah Newren via GitGitGadget, May 20, 2021
  52. 05/13 t6429: testcases for remembering renamesElijah Newren via GitGitGadget, May 20, 2021
  53. 08/13 merge-ort: add code to check for whether cached renames can be reusedElijah Newren via GitGitGadget, May 20, 2021
  54. 07/13 merge-ort: populate caches of rename detection resultsElijah Newren via GitGitGadget, May 20, 2021
  55. 06/13 merge-ort: add data structures for in-memory caching of rename detectionElijah Newren via GitGitGadget, May 20, 2021
  56. 09/13 merge-ort: avoid accidental API mis-useElijah Newren via GitGitGadget, May 20, 2021
  57. 10/13 merge-ort: preserve cached renames for the appropriate sideElijah Newren via GitGitGadget, May 20, 2021
  58. 12/13 merge-ort: handle interactions of caching and rename/rename(1to1) casesElijah Newren via GitGitGadget, May 20, 2021
  59. 11/13 merge-ort: add helper functions for using cached renamesElijah Newren via GitGitGadget, May 20, 2021
  60. 13/13 merge-ort, diffcore-rename: employ cached renames when possibleElijah Newren via GitGitGadget, May 20, 2021
  61. Derrick StoleeMay 22, 2021

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.