Re: [PATCH v4 6/6] list-objects-filter: implement filter tree:0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 14, 2018 at 04:55:34PM -0700, Matthew DeVore wrote:

> >   - it's expensive to compute, because you have to actually walk all of
> >     the possible commits and trees that could refer to it. This
> >     prohibits a lot of other optimizations like reachability bitmaps
> >     (though with some complexity you could cache the depths, too).
> I think what the user likely wants is to use the minimum depth based
> on the commits in the traversal, not every commit in the repo - is
> this what you mean?

Right, I'd agree they probably want the minimum for that traversal. And
for `rev-list --filter`, that's probably OK. But keep in mind the main
goal for --filter is using it for fetches, and many servers do not
perform the traversal at all. Instead they use reachability bitmaps to
come up with the set of objects to send. The bitmaps have enough
information to say "remove all trees from the set", but not enough to do
any kind of depth-based calculation (not even "is this a root tree").

> Makes sense. I changed it like this -
> 
> diff --git a/Documentation/rev-list-options.txt
> b/Documentation/rev-list-options.txt
> index 0b5f77ad3..5f1672913 100644
> --- a/Documentation/rev-list-options.txt
> +++ b/Documentation/rev-list-options.txt
> @@ -732,8 +732,10 @@ the requested refs.
>  The form '--filter=sparse:path=<path>' similarly uses a sparse-checkout
>  specification contained in <path>.
>  +
> -The form '--filter=tree:<depth>' omits all blobs and trees deeper than
> -<depth> from the root tree. Currently, only <depth>=0 is supported.
> +The form '--filter=tree:<depth>' omits all blobs and trees whose depth
> +from the root tree is >= <depth> (minimum depth if an object is located
> +at multiple depths in the commits traversed). Currently, only <depth>=0
> +is supported, which omits all blobs and trees.

Yes, I think that makes sense. Thanks!

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux