]> git.ipfire.org Git - thirdparty/git.git/commit - list-objects.c
list-objects: support for skipping tree traversal
authorMatthew DeVore <matvore@google.com>
Thu, 18 Oct 2018 00:39:15 +0000 (17:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Oct 2018 03:49:18 +0000 (12:49 +0900)
commit8b10a206f090e01ce1ac4d9a10ec769e2409e2b0
tree13308fe2d78d914e6e5548d144c4368b5980c471
parentd9e6d0942bb9f9fe9e4cca9670181e5b59074bcb
list-objects: support for skipping tree traversal

The tree:0 filter does not need to traverse the trees that it has
filtered out, so optimize list-objects and list-objects-filter to skip
traversing the trees entirely. Before this patch, we iterated over all
children of the tree, and did nothing for all of them, which was
wasteful.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
list-objects-filter.c
list-objects-filter.h
list-objects.c
t/t6112-rev-list-filters-objects.sh