Re: [PATCH v3 5/5] list-objects-filter: implement filter tree:0
- From
Matthew DeVore <matvore@google.com>
- Date
- Oct 3, 2018, 19:00 UTC
- Message-ID
- <CAMfpvhLsrBPtH66bOLX8HKmdKHs6_BpxG4q6P6MUkH-JUafkCg@mail.gmail.com>
- In-Reply-To
- <d751d56b-84bb-a03d-5f2a-7dbaf8d947cc@jeffhostetler.com>
On Tue, Aug 14, 2018 at 8:13 AM Jeff Hostetler <git@jeffhostetler.com> wrote:
Show 32 quoted lines
>
> There are a couple of options here:
> [] If really want to omit all trees and blobs (and we DO NOT want
> the oidset of everything omitted), then we might be able to
> shortcut the traversal and speed things up.
>
> {} add a LOFR_SKIP_TREE bit to list_objects_filter_result
> {} test this bit process_tree() and avoid the init_tree_desc() and
> the while loop and some adjacent setup/tear-down code.
> {} make this filter something like:
>
> case LOFS_BEGIN_TREE:
> if (filter_data->omits) {
> oidset_insert(filter_data->omits, &obj->oid);
> return LOFR_MARK_SEEN; /* ... (hard omit) */
> } else
> return LOFR_SKIP_TREE;
> case LOFS_BLOB:
> if (filter_data->omits) {
> oidset_insert(filter_data->omits, &obj->oid);
> return LOFR_MARK_SEEN; /* ... (hard omit) */
> else
> assert(...should not happen...);
>
> [] Later, if we choose to actually support a depth>0, we'll probably
> want a different filter function to conditionally include/exclude
> blobs, include shallow tree[node]s, and do some of the provisional-
> omit logic on deep tree[nodes] (in case a tree appears at multiple
> places/depths in the history). But that can wait.
>
> Jeff
>Jeff, have you made any progress on depth>0 support for the tree filter? I'd like to take a stab at it without duplicating work :)
- Matt