]> git.ipfire.org Git - thirdparty/git.git/commit
bundle-uri: test missing bundles with heuristic
authorDerrick Stolee <derrickstolee@github.com>
Tue, 31 Jan 2023 13:29:19 +0000 (13:29 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 Jan 2023 16:57:48 +0000 (08:57 -0800)
commit026df9e04789e2af7271566f312aae323740309f
treecd396575263fe79112f1aaa9332e04555b19b630
parentc429bed10223135a13f1f2f854e367762c37af7a
bundle-uri: test missing bundles with heuristic

The creationToken heuristic uses a different mechanism for downloading
bundles from the "standard" approach. Specifically: it uses a concrete
order based on the creationToken values and attempts to download as few
bundles as possible. It also modifies local config to store a value for
future fetches to avoid downloading bundles, if possible.

However, if any of the individual bundles has a failed download, then
the logic for the ordering comes into question. It is important to avoid
infinite loops, assigning invalid creation token values in config, but
also to be opportunistic as possible when downloading as many bundles as
seem appropriate.

These tests were used to inform the implementation of
fetch_bundles_by_token() in bundle-uri.c, but are being added
independently here to allow focusing on faulty downloads. There may be
more cases that could be added that result in modifications to
fetch_bundles_by_token() as interesting data shapes reveal themselves in
real scenarios.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5558-clone-bundle-uri.sh