]> git.ipfire.org Git - thirdparty/git.git/commit - ref-filter.c
ref-filter: make ref_array_item allocation more consistent
authorJeff King <peff@peff.net>
Fri, 6 Apr 2018 18:59:26 +0000 (14:59 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 8 Apr 2018 21:14:45 +0000 (06:14 +0900)
commit0ffaa00f453978bffc4ff0f8a45ea0a52549e7cd
tree201dd562cff9cec7fccda22d0868a6eea84ef632
parent53df97a29d78070f3dfaf3e4d9a5ae61f33d7906
ref-filter: make ref_array_item allocation more consistent

We have a helper function to allocate ref_array_item
structs, but it only takes a subset of the possible fields
in the struct as initializers. We could have it accept an
argument for _every_ field, but that becomes a pain for the
fields which some callers don't want to set initially.

Instead, let's be explicit that it takes only the minimum
required to create the ref, and that callers should then
fill in the rest themselves.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ref-filter.c