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

[PATCH 0/3] Add missing rename-related corner cases for merging

From
Elijah Newren <newren@gmail.com>
Date
Jul 2, 2018, 13:30 UTC
Message-ID
<20180702133054.18638-1-newren@gmail.com>

In merging, every rename acts as a two-piece lego in terms of conflicts. We have long realized that the other branch can (1) delete the source side of a rename, giving a rename/delete conflict, or (2) add a file in the way of the rename destination, giving a rename/add conflict, or (3) have a rename of its own touching either the same destination or source path, giving either a rename/rename(2to1) or rename/rename(1to2) conflict. But only in one case did we ever consider chaining these merge-conflict lego pieces (namely with rename/rename(1to2)/add/add conflicts). Add some testcases that show other ways these conflicts can be chained.

In short, any rename's source side can attach to a delete or another rename, and any rename's destination side can attach to an add or another rename.

This series was spurred by Robert Dailey's report back in March of a
rename case that git currently handles poorly:
  https://public-inbox.org/git/CAHd499Axo7HFviUJavigTZ6BGZCkj9iOSeNVndu1oPivkPv+5Q@mail.gmail.com/

This series adds a testcase covering the issue he reported, and then rounds things out additional testcases demonstrating other ways rename conflicts could be "chained" together.

Elijah Newren (3):
  t6042: add testcase covering rename/add/delete conflict type
  t6042: add testcase covering rename/rename(2to1)/delete/delete
    conflict
  t6042: add testcase covering long chains of rename conflicts
 t/t6042-merge-rename-corner-cases.sh | 245 +++++++++++++++++++++++++++
 1 file changed, 245 insertions(+)
-- 
2.18.0.130.gd703bbb5d
Next: Elijah Newren
Message 1 of 4 in “Add missing rename-related corner cases for merging”
  1. 0/3 Add missing rename-related corner cases for mergingElijah Newren, Jul 2, 2018
  2. 2/3 t6042: add testcase covering rename/rename(2to1)/delete/delete conflictElijah Newren, Jul 2, 2018
  3. 3/3 t6042: add testcase covering long chains of rename conflictsElijah Newren, Jul 2, 2018
  4. 1/3 t6042: add testcase covering rename/add/delete conflict typeElijah Newren, Jul 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.