list-objects: filter objects in traverse_commit_list
commit25ec7bcac044057900a0f3c9a8d6ccbb41a066bc
authorJeff Hostetler <jeffhost@microsoft.com>
Tue, 21 Nov 2017 20:58:50 +0000 (21 20:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Nov 2017 05:11:57 +0000 (22 14:11 +0900)
tree115a72c755c0578349d3cf08bef0b0883fd4153e
parentc3a9ad311793e16f6f5c5dcc3559133700c70288
list-objects: filter objects in traverse_commit_list

Create traverse_commit_list_filtered() and add filtering
interface to allow certain objects to be omitted from the
traversal.

Update traverse_commit_list() to be a wrapper for the above
with a null filter to minimize the number of callers that
needed to be changed.

Object filtering will be used in a future commit by rev-list
and pack-objects for partial clone and fetch to omit unwanted
objects from the result.

traverse_bitmap_commit_list() does not work with filtering.
If a packfile bitmap is present, it will not be used.  It
should be possible to extend such support in the future (at
least to simple filters that do not require object pathnames),
but that is beyond the scope of this patch series.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Reviewed-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
list-objects-filter-options.c [new file with mode: 0644]
list-objects-filter-options.h [new file with mode: 0644]
list-objects-filter.c [new file with mode: 0644]
list-objects-filter.h [new file with mode: 0644]
list-objects.c
list-objects.h
object.h