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

Re: [PATCH v2 3/5] diffcore-rename: enable limiting rename detection to relevant destinations

From
Elijah Newren <newren@gmail.com>
Date
Jun 3, 2021, 14:13 UTC
Message-ID
<CABPp-BHaGEKYKCbwJxYgk7mY_mx6h9dSReRn=PXEpd0xCzqsdg@mail.gmail.com>
In-Reply-To
<1016e500-8169-7bb3-8428-b5ea35d19630@gmail.com>
On Thu, Jun 3, 2021 at 5:54 AM Derrick Stolee <stolee@gmail.com> wrote:
Show 16 quoted lines
>
> On 6/1/2021 10:58 AM, Elijah Newren via GitGitGadget wrote:
> > From: Elijah Newren <newren@gmail.com>
> >
> > Our former optimizations focused on limiting rename detection to a
> > pre-specified set of relevant sources.  This was because the merge logic
> > only had a way of knowing which sources were relevant.  However, other
> > callers of rename detection might benefit from being able to limit
> > rename detection to a known set of relevant destinations.  In
> > particular, a properly implemented `git log --follow` might benefit from
> > such an ability.
>
> I would be interested in seeing such an improvement. It could also
> help the batch-download of missing blobs in a partial clone situation
> because it would only need the "deletes" portion of the diff, since we
> only care about one "add" (we'd need that blob, too, of course).

Oh, good point. And in order to work well with the new prefetching improvements (which will be the next series submitted), I should really rename remove_unneeded_paths_from_src() to remove_unneeded_paths() and add a relevant_destinations parameter and use it, instead of having the strset_contains() check in diffcore_rename_extended.

Show 12 quoted lines
> > Since the code to implement such limiting is very similar to what we've
> > already done, just implement it now even though we do not yet have any
> > callers making use of this ability.
>
> However, I'm not sure that this change is warranted without such an
> integration. Perhaps keep this patch here on the list as a reference
> for anyone who wants to do the `git log --follow` speedup? This person
> can include "you in the future".
>
> I'm just worried that without a consumer, this code has no automated
> validation and can either be buggy now or become buggy in the future
> before someone starts trying to use the logic.
Fair enough; I'll pull it out.
Previous: Derrick StoleeNext: Elijah Newren via GitGitGadget
Message 18 of 39 in “Optimization batch 12: miscellaneous unthemed stuff”
  1. 0/5 Optimization batch 12: miscellaneous unthemed stuffElijah Newren via GitGitGadget, May 27, 2021
  2. 1/5 merge-ort: replace string_list_df_name_compare with faster alternativeElijah Newren via GitGitGadget, May 27, 2021
  3. René ScharfeMay 27, 2021
  4. Elijah NewrenMay 27, 2021
  5. René ScharfeMay 28, 2021
  6. Elijah NewrenMay 28, 2021
  7. Taylor BlauMay 28, 2021
  8. Elijah NewrenMay 28, 2021
  9. 2/5 diffcore-rename: avoid unnecessary strdup'ing in break_idxElijah Newren via GitGitGadget, May 27, 2021
  10. 3/5 diffcore-rename: enable limiting rename detection to relevant destinationsElijah Newren via GitGitGadget, May 27, 2021
  11. 4/5 Fix various issues found in commentsElijah Newren via GitGitGadget, May 27, 2021
  12. 5/5 merge-ort: miscellaneous touch-upsElijah Newren via GitGitGadget, May 27, 2021
  13. 0/5 Optimization batch 12: miscellaneous unthemed stuffElijah Newren via GitGitGadget, Jun 1, 2021
  14. 1/5 merge-ort: replace string_list_df_name_compare with faster alternativeElijah Newren via GitGitGadget, Jun 1, 2021
  15. Derrick StoleeJun 2, 2021
  16. 3/5 diffcore-rename: enable limiting rename detection to relevant destinationsElijah Newren via GitGitGadget, Jun 1, 2021
  17. Derrick StoleeJun 3, 2021
  18. Elijah NewrenJun 3, 2021
  19. 2/5 diffcore-rename: avoid unnecessary strdup'ing in break_idxElijah Newren via GitGitGadget, Jun 1, 2021
  20. 4/5 Fix various issues found in commentsElijah Newren via GitGitGadget, Jun 1, 2021
  21. 5/5 merge-ort: miscellaneous touch-upsElijah Newren via GitGitGadget, Jun 1, 2021
  22. Derrick StoleeJun 3, 2021
  23. 0/4 Optimization batch 12: miscellaneous unthemed stuffElijah Newren via GitGitGadget, Jun 4, 2021
  24. 1/4 merge-ort: replace string_list_df_name_compare with faster alternativeElijah Newren via GitGitGadget, Jun 4, 2021
  25. 3/4 Fix various issues found in commentsElijah Newren via GitGitGadget, Jun 4, 2021
  26. 4/4 merge-ort: miscellaneous touch-upsElijah Newren via GitGitGadget, Jun 4, 2021
  27. 2/4 diffcore-rename: avoid unnecessary strdup'ing in break_idxElijah Newren via GitGitGadget, Jun 4, 2021
  28. Derrick StoleeJun 4, 2021
  29. Elijah NewrenJun 4, 2021
  30. Elijah NewrenJun 4, 2021
  31. Jeff KingJun 4, 2021
  32. Derrick StoleeJun 4, 2021
  33. Elijah NewrenJun 4, 2021
  34. Jeff KingJun 4, 2021
  35. 0/4 Optimization batch 12: miscellaneous unthemed stuffElijah Newren via GitGitGadget, Jun 8, 2021
  36. 2/4 diffcore-rename: avoid unnecessary strdup'ing in break_idxElijah Newren via GitGitGadget, Jun 8, 2021
  37. 1/4 merge-ort: replace string_list_df_name_compare with faster alternativeElijah Newren via GitGitGadget, Jun 8, 2021
  38. 3/4 Fix various issues found in commentsElijah Newren via GitGitGadget, Jun 8, 2021
  39. 4/4 merge-ort: miscellaneous touch-upsElijah Newren via GitGitGadget, Jun 8, 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.