ref_remove_duplicates(): simplify loop logic
commitb9afe6654db2bfb776db933f832e7e03052adf98
authorMichael Haggerty <mhagger@alum.mit.edu>
Wed, 30 Oct 2013 05:33:09 +0000 (30 06:33 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Oct 2013 21:16:41 +0000 (30 14:16 -0700)
treeb88e6f7c317f436739cd15d8942bc00518d391c2
parent2071e05ed27df847e300b51aca661a34a765aea3
ref_remove_duplicates(): simplify loop logic

Change the loop body into the more straightforward

* remove item from the front of the old list
* if necessary, add it to the tail of the new list

and return a pointer to the new list (even though it is currently
always the same as the input argument, because the first element in
the list is currently never deleted).

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