]> git.ipfire.org Git - thirdparty/git.git/commit - fetch-pack.c
fetch-pack: split up everything_local()
authorJonathan Tan <jonathantanmy@google.com>
Wed, 6 Jun 2018 20:47:07 +0000 (13:47 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Jun 2018 18:31:24 +0000 (11:31 -0700)
commit34c2903456046e194b3c3cde23e108a788571ffd
treef1fd5c821b287ca7305b0a28de45a0ad18cfd536
parent68372c88794aba15f853542008cda39def768372
fetch-pack: split up everything_local()

The function everything_local(), despite its name, also (1) marks
commits as COMPLETE and COMMON_REF and (2) invokes filter_refs() as
important side effects. Extract (1) into its own function
(mark_complete_and_common_ref()) and remove
(2).

The restoring of save_commit_buffer, which was introduced in a1c6d7c1a7
("fetch-pack: restore save_commit_buffer after use", 2017-12-08), is a
concern of the parse_object() call in mark_complete_and_common_ref(), so
it has been moved from the end of everything_local() to the end of
mark_complete_and_common_ref().

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fetch-pack.c