summaryrefslogtreecommitdiff
path: root/builtin/grep.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2018-04-06 14:59:45 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-04-09 06:14:46 +0900
commit427cbc9dbfeb7c96bb1d5d9ace722353e2a5438e (patch)
tree744ac05e882b68aefcaabc345a28672effb08c12 /builtin/grep.c
parentref-filter: make ref_array_item allocation more consistent (diff)
downloadtgif-427cbc9dbfeb7c96bb1d5d9ace722353e2a5438e.tar.xz
ref-filter: factor ref_array pushing into its own function
In preparation for callers constructing their own ref_array structs, let's move our own internal push operation into its own function. While we're at it, we can replace REALLOC_ARRAY() with ALLOC_GROW(), which should give the growth operation amortized linear complexity (as opposed to growing by one, which is potentially quadratic, though in-place realloc growth often makes this faster in practice). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/grep.c')
0 files changed, 0 insertions, 0 deletions