fetch: use free_refs()
There's no need for us to write this loop manually when a helper function can already do it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
533ddba47e
commit
259eddde6a
@ -630,10 +630,7 @@ static void filter_refs(struct fetch_pack_args *args,
|
|||||||
}
|
}
|
||||||
|
|
||||||
oidset_clear(&tip_oids);
|
oidset_clear(&tip_oids);
|
||||||
for (ref = unmatched; ref; ref = next) {
|
free_refs(unmatched);
|
||||||
next = ref->next;
|
|
||||||
free(ref);
|
|
||||||
}
|
|
||||||
|
|
||||||
*refs = newlist;
|
*refs = newlist;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user