Re: [PATCH 4/8] merge-tree: implement real merges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 3, 2022 at 4:23 AM Fabian Stelzer <fs@xxxxxxxxxxxx> wrote:
>
> On 31.12.2021 05:04, Elijah Newren via GitGitGadget wrote:
> >From: Elijah Newren <newren@xxxxxxxxx>
> >
> >This adds the ability to perform real merges rather than just trivial
> >merges (meaning handling three way content merges, recursive ancestor
> >consolidation, renames, proper directory/file conflict handling, and so
> >forth).  However, unlike `git merge`, the working tree and index are
> >left alone and no branch is updated.
> >
...
> >+test_expect_success setup '
> >+      test_write_lines 1 2 3 4 5 >numbers &&
> >+      echo hello >greeting &&
> >+      echo foo >whatever &&
> >+      git add numbers greeting whatever &&
> >+      git commit -m initial &&
> >+
> >+      git branch side1 &&
> >+      git branch side2 &&
> >+
> >+      git checkout side1 &&
> >+      test_write_lines 1 2 3 4 5 6 >numbers &&
> >+      echo hi >greeting &&
> >+      echo bar >whatever &&
> >+      git add numbers greeting whatever &&
> >+      git commit -m rename-and-modify &&
>
> The commit implies a rename as well which I think is missing.

Sorry, I revised the testcase (multiple times) and forgot to update
this commit message string.

> >+
> >+      git checkout side2 &&
> >+      test_write_lines 0 1 2 3 4 5 >numbers &&
> >+      echo yo >greeting &&
> >+      git rm whatever &&
> >+      mkdir whatever &&
> >+      >whatever/empty &&
> >+      git add numbers greeting whatever/empty &&
> >+      git commit -m remove-and-rename
>
> And this looks more like a remove-and-modify.

Likewise.


I'll fix these up; thanks for pointing them out.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux