t6422: fix multiple errors with the mod6 test expectations
commita1d8b01775d3dec8b641974821fe512be7fef2bb
authorElijah Newren <newren@gmail.com>
Mon, 10 Aug 2020 22:29:14 +0000 (10 22:29 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Aug 2020 22:59:01 +0000 (10 15:59 -0700)
tree4c73b4d9fc48aa26a78b8adf40d32479efa4234a
parenta0601b2eb3213d125b1e9b40215e9ba4959af6e9
t6422: fix multiple errors with the mod6 test expectations

This test had multiple issues causing it to fail for the wrong
reason(s):

  * rename/rename(1to2) conflicts have always left the original source
    path present in the working directory and index (at stage 1).  Thus,
    the triple rename/rename(1to2) should result in 9 unstaged files,
    not 6.
  * It messed up the three-way content merge for checking the results of
    merging for one of the renames, accidentally turning it into a
    two-way merge.
  * It got the contents of the base files it was using to compare
    against wrong, due to an off-by-one error, and overwrite-redirection
    ('>') instead of append-redirection ('>>').
  * It used slightly too-long conflict markers
  * It didn't include filenames in the conflict marker hunks (granted,
    that was a shortcoming of the merge-recursive backend for rename/add
    and rename/rename(2to1) conflicts, but since it's
    test_expect_failure anyway we might as well make it expect our
    preferred behavior rather than some compromise that we can't yet
    reach anyway).

Fix these issues so that a merge backend which correctly handles these
kinds of nested conflicts will pass the test.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6422-merge-rename-corner-cases.sh