summaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2017-02-10 21:03:30 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-02-13 12:06:10 -0800
commit96f6d3f61ad02ef2fd0393765207233845a7c7e0 (patch)
tree5aea76d086b7c1ab0d2131f743d12c3d3fff69d8 /Documentation/technical
parentls-files: pass prefix length explicitly to prune_cache() (diff)
downloadtgif-96f6d3f61ad02ef2fd0393765207233845a7c7e0.tar.xz
ls-files: move only kept cache entries in prune_cache()
prune_cache() first identifies those entries at the start of the sorted array that can be discarded. Then it moves the rest of the entries up. Last it identifies the unwanted trailing entries among the moved ones and cuts them off. Change the order: Identify both start *and* end of the range to keep first and then move only those entries to the top. The resulting code is slightly shorter and a bit more efficient. Signed-off-by: Rene Scharfe <l.s.r@web.de> Reviewed-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical')
0 files changed, 0 insertions, 0 deletions