From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 767611F4B4 for ; Thu, 15 Apr 2021 09:42:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232116AbhDOJm5 (ORCPT ); Thu, 15 Apr 2021 05:42:57 -0400 Received: from cloud.peff.net ([104.130.231.41]:53198 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232100AbhDOJm4 (ORCPT ); Thu, 15 Apr 2021 05:42:56 -0400 Received: (qmail 10037 invoked by uid 109); 15 Apr 2021 09:42:34 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Thu, 15 Apr 2021 09:42:34 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 14706 invoked by uid 111); 15 Apr 2021 09:42:35 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Thu, 15 Apr 2021 05:42:35 -0400 Authentication-Results: peff.net; auth=none Date: Thu, 15 Apr 2021 05:42:33 -0400 From: Jeff King To: Patrick Steinhardt Cc: git@vger.kernel.org, Christian Couder , Taylor Blau , Philip Oakley Subject: Re: [PATCH v4 0/8] rev-list: implement object type filter Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 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