summaryrefslogtreecommitdiff
path: root/t/helper/test-dump-untracked-cache.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-08-18 16:41:25 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-08-18 09:47:46 -0700
commitf1e11c6510846321574e0ad9443843d7ba3eb758 (patch)
tree36df1345e4cdfbd82cbe7f5f26aeed9390b86f9e /t/helper/test-dump-untracked-cache.c
parentunpack-trees: optimize walking same trees with cache-tree (diff)
downloadtgif-f1e11c6510846321574e0ad9443843d7ba3eb758.tar.xz
unpack-trees: reduce malloc in cache-tree walk
This is a micro optimization that probably only shines on repos with deep directory structure. Instead of allocating and freeing a new cache_entry in every iteration, we reuse the last one and only update the parts that are new each iteration. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-dump-untracked-cache.c')
0 files changed, 0 insertions, 0 deletions