Re: [PATCH v4 0/8] rev-list: implement object type filter

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

 



On Tue, Apr 13, 2021 at 10:06:13AM +0200, Patrick Steinhardt wrote:

> I don't think it would help usability to add new `--show-blobs` and
> `--show-trees` options. The user interface to show this kind of
> information exists already with `--objects`, and by adding another way
> of asking a similar query would raise the question of how these two ways
> interact with each other:
> 
>     - Does `--show-blobs` have effect if `--objects` is not set?
> 
>     - Is `--objects` redundant if we have `--show-blobs`, or would
>       `--objects --show-blobs` list all objects regardless of whether
>       they're blobs or not?
> 
>     - What would happen if the user says `--show-blobs --no-objects`?
> 
>     - Are these options mutually exclusive?
> 
> We avoid all these questions by just adding it as a filter.

I'm not too worried about those. I'd imagine that "--objects" becomes a
documented synonym for "--show-trees --show-blobs --show-commits
--show-tags", and then the usual interactions take over.

But...

> Furthermore, the filter also allows future iterations which build on top
> of this. If we had a combined OR filter in addition to the existing
> combined AND filter, the user could say "Give me all blobs which aren't
> bigger than a specific size PLUS all trees with a depth smaller than 5
> PLUS all commits and tags". It's not like I'd know of a specific usecase
> for this right now, but I think the potential of having such filters in
> the future is a plus.

Yeah, that's true. My biggest complaint is lack of an OR filter, but we
could add that later. And then we would be _more_ flexible, as you note,
since we could and/or more filters.

So I'm OK proceeding with this direction.

-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