]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t2107: modernize path existence check
authorAditya <adityabnw07@gmail.com>
Wed, 18 Mar 2026 20:07:35 +0000 (20:07 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Mar 2026 20:13:08 +0000 (13:13 -0700)
Replace '! test -f' with 'test_path_is_missing' to get better
debugging information by reporting loudly what expectation was
not met when the assertion fails.

Signed-off-by: Aditya <adityabnw07@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t2107-update-index-basic.sh

index cc72ead79f397873b5005196a99baad6b0ba2450..3bffe5da8a87cc4ba9701010f3d8aac4cedaa846 100755 (executable)
@@ -86,7 +86,7 @@ test_expect_success '.lock files cleaned up' '
        # the_index.cache_changed is zero, rollback_lock_file fails
        git update-index --refresh --verbose >out &&
        test_must_be_empty out &&
-       ! test -f .git/index.lock
+       test_path_is_missing .git/index.lock
        )
 '