Skip to content
  • Denton Liu's avatar
    t1501: remove use of `test_might_fail cp` · 10812c23
    Denton Liu authored and Junio C Hamano's avatar Junio C Hamano committed
    The test_must_fail() family of functions (including test_might_fail())
    should only be used on git commands. Replace test_might_fail() with
    a compound command wrapping the old cp invocation that always returns 0.
    
    The `test_might_fail cp` line was introduced in 466e8d5d
    
     (t1501: fix
    test with split index, 2015-03-24). It is necessary because there might
    exist some index files in `repo.git/sharedindex.*` and, if they exist,
    we want to copy them over. However, if they don't exist, we don't want
    to error out because we expect that possibility. As a result, we want to
    keep the "might fail" semantics so we always return 0, even if the
    underlying cp errors out.
    
    Signed-off-by: default avatarDenton Liu <liu.denton@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    10812c23