t7003: use rev-parse rather than FS inspection

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Han-Wen Nienhuys 2021-05-31 16:56:26 +00:00 committed by Junio C Hamano
parent f1ed224753
commit fdc8acc706

View file

@ -395,7 +395,7 @@ test_expect_success '--prune-empty is able to prune root commit' '
test_expect_success '--prune-empty is able to prune entire branch' ' test_expect_success '--prune-empty is able to prune entire branch' '
git branch prune-entire B && git branch prune-entire B &&
git filter-branch -f --prune-empty --index-filter "git update-index --remove A.t B.t" prune-entire && git filter-branch -f --prune-empty --index-filter "git update-index --remove A.t B.t" prune-entire &&
test_path_is_missing .git/refs/heads/prune-entire && test_must_fail git rev-parse refs/heads/prune-entire &&
test_must_fail git reflog exists refs/heads/prune-entire test_must_fail git reflog exists refs/heads/prune-entire
' '