bundle: avoid using the rev_info flag leak_pending
commit63647391e6c306363dcb61d160c84cc601912efb
authorRené Scharfe <l.s.r@web.de>
Mon, 25 Dec 2017 17:46:14 +0000 (25 18:46 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Dec 2017 21:50:05 +0000 (28 13:50 -0800)
treefa1fec16eabad8fb9d8efd368c96b205cee24b3d
parent148f14ab5e066bb95a9f0bc00380ca98369555dd
bundle: avoid using the rev_info flag leak_pending

The leak_pending flag is so awkward to use that multiple comments had to
be added around each occurrence.  We use it for remembering the
prerequisites for the bundle.  That is easy, though: We have the
ref_list named "prerequisites" in the header for just that purpose.

Use this original list of prerequisites to check if all of them are
present and to clear their commit marks afterward.  The two new loops
are intentionally kept similar to the first one in the function.
Calling parse_object() a second time is expected be quick and successful
in each case -- any errors should have been handled in the first round.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bundle.c