summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-08-18 16:41:25 +0200
committerJunio C Hamano <gitster@pobox.com>2018-08-18 09:47:46 -0700
commitf1e11c6510846321574e0ad9443843d7ba3eb758 (patch)
tree36df1345e4cdfbd82cbe7f5f26aeed9390b86f9e /commit.c
parentb4da37380b7774248086f42bcd59397a44e1ac79 (diff)
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 'commit.c')
0 files changed, 0 insertions, 0 deletions