]> git.ipfire.org Git - thirdparty/git.git/commit - t/t5510-fetch.sh
fetch: increase test coverage of fetches
authorPatrick Steinhardt <ps@pks.im>
Thu, 17 Feb 2022 13:04:16 +0000 (14:04 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Feb 2022 19:19:43 +0000 (11:19 -0800)
commit2a0cafd464709cfa22fe7249290c644a2a26c520
tree264e2453d456526f6de7467c14284a36e01f6464
parent45fe28c951c3e70666ee4ef8379772851a8e4d32
fetch: increase test coverage of fetches

When using git-fetch(1) with the `--atomic` flag the expectation is that
either all of the references are updated, or alternatively none are in
case the fetch fails. While we already have tests for this, we do not
have any tests which exercise atomicity either when pruning deleted refs
or when backfilling tags. This gap in test coverage hides that we indeed
don't handle atomicity correctly for both of these cases.

Add test cases which cover these testing gaps to demonstrate the broken
behaviour. Note that tests are not marked as `test_expect_failure`: this
is done to explicitly demonstrate the current known-wrong behaviour, and
they will be fixed up as soon as we fix the underlying bugs.

While at it this commit also adds another test case which demonstrates
that backfilling of tags does not return an error code in case the
backfill fails. This bug will also be fixed by a subsequent commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5503-tagfollow.sh
t/t5510-fetch.sh