Code

checkout: use leak_pending flag
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Sat, 1 Oct 2011 16:09:36 +0000 (18:09 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 3 Oct 2011 18:15:32 +0000 (11:15 -0700)
commit1062141928aaa1d272be8ce007d371168e8daef6
treeffdfe54831539ce4218798c22e1b6d621f32857f
parent5be7859962585589f374f8467f3252bfcfa10fd0
checkout: use leak_pending flag

Instead of going through all the references again when we clear the
commit marks, do it like bisect and bundle and gain ownership of the
list of pending objects which we constructed from those references.

We simply copy the struct object_array that points to the list, set
the flag leak_pending and then prepare_revision_walk won't destroy
it and it's ours.  We use it to clear the marks and  free it at the
end.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/checkout.c