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

Re: [PATCH v3 00/33] Add directory rename detection to git

From
Stefan Beller <sbeller@google.com>
Date
Nov 22, 2017, 19:24 UTC
Message-ID
<CAGZ79kbustk48yP7jC6UmjidQUuWfhQWcqX_CUz=WnM0X3H8aw@mail.gmail.com>
In-Reply-To
<CABPp-BFm7ZcYbie-n-ASmb6MDyJXW3G8YdtHRAzpVNgOvwK5MA@mail.gmail.com>
On Tue, Nov 21, 2017 at 5:12 PM, Elijah Newren <newren@gmail.com> wrote:
Show 28 quoted lines
> On Tue, Nov 21, 2017 at 4:42 PM, Stefan Beller <sbeller@google.com> wrote:
>> On Tue, Nov 21, 2017 at 12:00 AM, Elijah Newren <newren@gmail.com> wrote:
>>> This patchset introduces directory rename detection to merge-recursive; I'm
>>> resubmitting just a few hours after my PATCHv2 because I didn't know about
>>> the DEVELOPER=1 flag previously, and my code had a number of
>>> warnings/errors.  I would have just submitted fixup/squash patches, but
>>> when I checked, there sadly they cause merge conflicts when rebasing
>>>
>>> See https://public-inbox.org/git/20171110190550.27059-1-newren@gmail.com/
>>> for the first series, design considerations, etc, and
>>> https://public-inbox.org/git/20171120220209.15111-1-newren@gmail.com/ for
>>> v2.
>>
>> Thanks, I'll take a look!
>>
>> Protip: To make it easy for reviewers add an interdiff[1] between the different
>> versions of the patch series, this can be done via tbdiff[2] for example,
>> or in case you still have the old branch around or Junio has it queued already,
>> you can do a diff against that branch.
>
> Thanks!
>
> Interesting; tbdiff looks cool.  Junio hasn't queued this series yet,
> but it's easy enough to reconstruct the old one.  It does weigh in
> pretty heavy, and I'm slighly worried about gmail mangling all the
> lines, but I'm going to give it a shot anyway.  If it's too mangled,
> I'll try to repost using git-send-email.  It does weigh in at over
> 1600 lines, so it's not small.

In my first round of review I only looked over the tests to see if I'd find the behavior intuitive, I spared the implementation, as Junio seemed to have reviewed a couple patches of the v1 implementation.

Now I also looked over the implementation and quite like it, though I'd be happy if others would also have a look.

All but one comment were minor style nits, which are no big deal; the other remark that I was musing about was whether we want to use strbufs in the new code instead of e.g. sprintfs to extend strings. And I'd think we would want to use them unless there are compelling reasons not to.

Thanks, Stefan

Previous: Junio C HamanoNext: Elijah Newren
Message 43 of 48 in “Add directory rename detection to git”
  1. 00/33 Add directory rename detection to gitElijah Newren, Nov 21, 2017
  2. 10/33 directory rename detection: more involved edge/corner testcasesElijah Newren, Nov 21, 2017
  3. 21/33 merge-recursive: add get_directory_renames()Elijah Newren, Nov 21, 2017
  4. Johannes SchindelinNov 26, 2017
  5. Elijah NewrenNov 26, 2017
  6. 06/33 directory rename detection: testcases to avoid taking detection too farElijah Newren, Nov 21, 2017
  7. 15/33 merge-recursive: move the get_renames() functionElijah Newren, Nov 21, 2017
  8. 29/33 merge-recursive: fix overwriting dirty files involved in renamesElijah Newren, Nov 21, 2017
  9. 03/33 merge-recursive: add explanation for src_entry and dst_entryElijah Newren, Nov 21, 2017
  10. 22/33 merge-recursive: check for directory level conflictsElijah Newren, Nov 21, 2017
  11. Stefan BellerNov 22, 2017
  12. 25/33 merge-recursive: check for file level conflicts then get new nameElijah Newren, Nov 21, 2017
  13. Stefan BellerNov 22, 2017
  14. 24/33 merge-recursive: add computation of collisions due to dir rename & mergingElijah Newren, Nov 21, 2017
  15. 04/33 directory rename detection: basic testcasesElijah Newren, Nov 21, 2017
  16. 05/33 directory rename detection: directory splitting testcasesElijah Newren, Nov 21, 2017
  17. 20/33 merge-recursive: add a new hashmap for storing directory renamesElijah Newren, Nov 21, 2017
  18. 18/33 merge-recursive: make !o->detect_rename codepath more obviousElijah Newren, Nov 21, 2017
  19. 02/33 merge-recursive: fix logic ordering issueElijah Newren, Nov 21, 2017
  20. 19/33 merge-recursive: split out code for determining diff_filepairsElijah Newren, Nov 21, 2017
  21. 31/33 directory rename detection: new testcases showcasing a pair of bugsElijah Newren, Nov 21, 2017
  22. 11/33 directory rename detection: testcases exploring possibly suboptimal mergesElijah Newren, Nov 21, 2017
  23. Stefan BellerNov 22, 2017
  24. 23/33 merge-recursive: add a new hashmap for storing file collisionsElijah Newren, Nov 21, 2017
  25. 09/33 directory rename detection: testcases checking which side did the renameElijah Newren, Nov 21, 2017
  26. 16/33 merge-recursive: introduce new functions to handle rename logicElijah Newren, Nov 21, 2017
  27. 13/33 directory rename detection: tests for handling overwriting untracked filesElijah Newren, Nov 21, 2017
  28. 26/33 merge-recursive: when comparing files, don't include treesElijah Newren, Nov 21, 2017
  29. 28/33 merge-recursive: avoid clobbering untracked files with directory renamesElijah Newren, Nov 21, 2017
  30. 27/33 merge-recursive: apply necessary modifications for directory renamesElijah Newren, Nov 21, 2017
  31. 33/33 merge-recursive: ensure we write updates for directory-renamed fileElijah Newren, Nov 21, 2017
  32. 32/33 merge-recursive: avoid spurious rename/rename conflict from dir renamesElijah Newren, Nov 21, 2017
  33. 14/33 directory rename detection: tests for handling overwriting dirty filesElijah Newren, Nov 21, 2017
  34. 12/33 directory rename detection: miscellaneous testcases to complete coverageElijah Newren, Nov 21, 2017
  35. 17/33 merge-recursive: fix leaks of allocated renames and diff_filepairsElijah Newren, Nov 21, 2017
  36. 08/33 directory rename detection: files/directories in the way of some renamesElijah Newren, Nov 21, 2017
  37. 07/33 directory rename detection: partially renamed directory testcase/discussionElijah Newren, Nov 21, 2017
  38. 01/33 Tighten and correct a few testcases for merging and cherry-pickingElijah Newren, Nov 21, 2017
  39. 30/33 merge-recursive: fix remaining directory rename + dirty overwrite casesElijah Newren, Nov 21, 2017
  40. Stefan BellerNov 22, 2017
  41. Elijah NewrenNov 22, 2017
  42. Junio C HamanoNov 22, 2017
  43. Stefan BellerNov 22, 2017
  44. Elijah NewrenNov 23, 2017
  45. Adam DinwoodieNov 23, 2017
  46. Elijah NewrenNov 23, 2017
  47. Elijah NewrenNov 24, 2017
  48. Elijah NewrenNov 24, 2017

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.