]> git.ipfire.org Git - thirdparty/git.git/commit - t/t6423-merge-rename-directories.sh
t6423: add tests of dual directory rename plus add/add conflict
authorElijah Newren <newren@gmail.com>
Tue, 5 Jul 2022 01:33:39 +0000 (01:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Jul 2022 16:39:46 +0000 (09:39 -0700)
commit0565cee5e4721c1f991cf9054a2d642a4a72e579
treee47d21da3d2c5efab9a21441f23d871c31335558
parentdc8c8deaa6b5847733bd7df011a4c7b7d1a64e0a
t6423: add tests of dual directory rename plus add/add conflict

This is an attempt at minimalizing a testcase reported by Glen Choo
with tensorflow where merge-ort would report an assertion failure:

    Assertion failed: (ci->filemask == 2 || ci->filemask == 4), function apply_directory_rename_modifications, file merge-ort.c, line 2410

reversing the direction of the merge provides a different error:

    error: cache entry has null sha1: ...
    fatal: unable to write .git/index

so we add testcases for both.  With these new testcases, the
recursive strategy differs in that it returns the latter error for
both merge directions.

These testcases are somehow a little different than Glen's original
tensorflow testcase in that these ones trigger a bug with the recursive
algorithm whereas his testcase didn't.  I figure that means these
testcases somehow manage to be more comprehensive.

Reported-by: Glen Choo <chooglen@google.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6423-merge-rename-directories.sh