filter_refs(): build refs list as we go
commit5096e4875303038ffc34af96c28cf2a2b7e103a6
authorMichael Haggerty <mhagger@alum.mit.edu>
Sun, 9 Sep 2012 06:19:44 +0000 (9 08:19 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Sep 2012 18:46:31 +0000 (12 11:46 -0700)
tree0daa5e5c4abb35ebb95d5b383e57512d73e05253
parent4ba159996f6c1b0d6dd0a2a8bd9d6f5b342a4aa5
filter_refs(): build refs list as we go

Instead of temporarily storing matched refs to temporary array
"return_refs", simply append them to newlist as we go.  This changes
the order of references in newlist to strictly sorted if "--all" and
"--depth" and named references are all specified, but that usage is
broken anyway (see the last two tests in t5500).

This changes the last test in t5500 from segfaulting into just
emitting a spurious error (this will be fixed in a moment).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch-pack.c