send-pack: refactor inspecting and resetting status and sending commands
commit16be9375a60413411009b981af53a4f2802bd70e
authorJunio C Hamano <gitster@pobox.com>
Fri, 15 Aug 2014 19:29:42 +0000 (15 12:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Aug 2014 22:36:00 +0000 (22 15:36 -0700)
tree649663dda685b6fe81ccebc0e74c762a40216553
parent27ab9b1ca63ba99479fbad1e365d73b54ffb1944
send-pack: refactor inspecting and resetting status and sending commands

The main loop over remote_refs list inspects the ref status
to see if we need to generate pack data (i.e. a delete-only push
does not need to send any additional data), resets it to "expecting
the status report" state, and formats the actual update commands
to be sent.

Split the former two out of the main loop, as it will become
conditional in later steps.

Besides, we should have code that does real thing here, before the
"Finally, tell the other end!" part ;-)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
send-pack.c