Skip to content
  • Elijah Newren's avatar
    Tighten and correct a few testcases for merging and cherry-picking · 7c5585ff
    Elijah Newren authored and Junio C Hamano's avatar Junio C Hamano committed
    t3501 had a testcase originally added in 05f2dfb9 (cherry-pick:
    demonstrate a segmentation fault, 2016-11-26) to ensure cherry-pick
    wouldn't segfault when working with a dirty file involved in a rename.
    While the segfault was fixed, there was another problem this test
    demonstrated: namely, that git would overwrite a dirty file involved in a
    rename.  Further, the test encoded a "successful merge" and overwriting of
    this file as correct behavior.  Modify the test so that it would still
    catch the segfault, but to require the correct behavior.  Mark it as
    test_expect_failure for now too, since this second bug is not yet fixed.
    
    t7607 had a test added in 30fd3a54
    
     (merge overwrites unstaged changes in
    renamed file, 2012-04-15) specific to looking for a merge overwriting a
    dirty file involved in a rename, but it too actually encoded what I would
    term incorrect behavior: it expected the merge to succeed.  Fix that, and
    add a few more checks to make sure that the merge really does produce the
    expected results.
    
    Reviewed-By: default avatarStefan Beller <sbeller@google.com>
    Signed-off-by: default avatarElijah Newren <newren@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    7c5585ff