git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elijah Newren <newren@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Elijah Newren <newren@gmail.com>
Subject: [PATCH 0/3] Add missing rename-related corner cases for merging
Date: Mon,  2 Jul 2018 06:30:51 -0700	[thread overview]
Message-ID: <20180702133054.18638-1-newren@gmail.com> (raw)

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


             reply	other threads:[~2018-07-02 13:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-02 13:30 Elijah Newren [this message]
2018-07-02 13:30 ` [PATCH 1/3] t6042: add testcase covering rename/add/delete conflict type Elijah Newren
2018-07-02 13:30 ` [PATCH 2/3] t6042: add testcase covering rename/rename(2to1)/delete/delete conflict Elijah Newren
2018-07-02 13:30 ` [PATCH 3/3] t6042: add testcase covering long chains of rename conflicts Elijah Newren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180702133054.18638-1-newren@gmail.com \
    --to=newren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).