]> git.ipfire.org Git - thirdparty/git.git/commit
t5710: arrange to delete the client before cloning
authorChristian Couder <christian.couder@gmail.com>
Tue, 18 Mar 2025 11:00:05 +0000 (12:00 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Mar 2025 19:22:33 +0000 (12:22 -0700)
commit9e05fbe61ba029a3ff9a984709875d76341a217c
tree451340f53428549c50b4db3d382fb06847fe8674
parent5040f9f164ea7d633237e52bed311d1e9773c78e
t5710: arrange to delete the client before cloning

If `test_when_finished "rm -rf client"` is run after we clone, it
will not run if the clone failed, so the "client" directory might
not be removed at the end of the test.

`git clone` does try to remove the directory when it fails, but
let's be safe and try to protect against possibly weird clone
failures by moving `test_when_finished "rm -rf client"` before
the clone. It just makes more sense this way around.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5710-promisor-remote-capability.sh