]> git.99rst.org Git - git.git/commit
fetch-pack: move fetch initialization
authorCalvin Wan <redacted>
Fri, 24 Jul 2026 10:54:19 +0000 (12:54 +0200)
committerJunio C Hamano <redacted>
Fri, 24 Jul 2026 15:46:59 +0000 (08:46 -0700)
commit24f082e6f45e39dc36f55a3344696d707740f56e
tree2af293aefd580bdfe19e194d4f1be6f2f2126015
parenteb1fbc64b705deaf600bbba777616209280f43a5
fetch-pack: move fetch initialization

There are some variables initialized at the start of the
do_fetch_pack_v2() state machine. Currently, they are initialized in
FETCH_CHECK_LOCAL, which is the initial state set at the beginning
of the function.

However, a subsequent patch will allow for another initial state,
while still requiring these initialized variables.
Move the initialization to be before the state machine,
so that they are set regardless of the initial state.

Note that there is no change in behavior, because we're moving code
from the beginning of the first state to just before the execution of
the state machine.

Helped-by: Jonathan Tan <redacted>
Helped-by: Christian Couder <redacted>
Signed-off-by: Calvin Wan <redacted>
Signed-off-by: Eric Ju <redacted>
Signed-off-by: Pablo Sabater <redacted>
Signed-off-by: Junio C Hamano <redacted>
fetch-pack.c
git clone https://git.99rst.org/PROJECT