filter_refs(): simplify logic
commitf537cfa7501de5e4dcdac55a95515e9a2ff880e3
authorMichael Haggerty <mhagger@alum.mit.edu>
Sun, 9 Sep 2012 06:19:45 +0000 (9 08:19 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Sep 2012 18:46:31 +0000 (12 11:46 -0700)
tree3d91011e03fbee09ef9a94d86c60d238f2f1fa9f
parent5096e4875303038ffc34af96c28cf2a2b7e103a6
filter_refs(): simplify logic

Simplify flow within loop: first decide whether to keep the reference,
then keep/free it.  This makes it clearer that each ref has exactly
two possible destinies, and removes duplication of the code for
appending the reference to the linked list.

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