]> git.ipfire.org Git - thirdparty/git.git/commit
maintenance: simplify prefetch logic
authorDerrick Stolee <dstolee@microsoft.com>
Tue, 6 Apr 2021 18:47:46 +0000 (18:47 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Apr 2021 21:23:47 +0000 (14:23 -0700)
commita039a1fcf987de3a8209cc5229324d37d9ead16e
tree5c07e7e45cfeaf0bc579d649968ab0d56d3723ea
parent48bf2fa8bad054d66bd79c6ba903c89c704201f7
maintenance: simplify prefetch logic

The previous logic filled a string list with the names of each remote,
but instead we could simply run the appropriate 'git fetch' data
directly in the remote iterator. Do this for reduced code size, but also
because it sets up an upcoming change to use the remote's refspec. This
data is accessible from the 'struct remote' data that is now accessible
in fetch_remote().

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/gc.c