]> git.ipfire.org Git - thirdparty/git.git/commit - bundle-uri.c
fetch: download bundles once, even with --all
authorDerrick Stolee <derrickstolee@github.com>
Fri, 31 Mar 2023 15:59:04 +0000 (15:59 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 31 Mar 2023 17:07:33 +0000 (10:07 -0700)
commit25bccb4b79dce1d5c259228ef3c91eadcd13d8ac
tree3ce494cb3a51ccb7a49c3bad5f744969b65ebe8c
parent6369acd968d02899973a9a853c48029b92cea401
fetch: download bundles once, even with --all

When fetch.bundleURI is set, 'git fetch' downloads bundles from the
given bundle URI before fetching from the specified remote. However,
when using non-file remotes, 'git fetch --all' will launch 'git fetch'
subprocesses which then read fetch.bundleURI and fetch the bundle list
again. We do not expect the bundle list to have new information during
these multiple runs, so avoid these extra calls by un-setting
fetch.bundleURI in the subprocess arguments.

Be careful to skip fetching bundles for the empty bundle string.
Fetching bundles from the empty list presents some interesting test
failures.

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