From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.3 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id EDBCE1F859 for ; Fri, 19 Aug 2016 13:09:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754874AbcHSNJa (ORCPT ); Fri, 19 Aug 2016 09:09:30 -0400 Received: from mout.gmx.net ([212.227.17.21]:59590 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754047AbcHSNJa (ORCPT ); Fri, 19 Aug 2016 09:09:30 -0400 Received: from virtualbox ([37.24.141.212]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MgpmG-1bo1FB0tMW-00M4fk; Fri, 19 Aug 2016 15:09:21 +0200 Date: Fri, 19 Aug 2016 15:09:19 +0200 (CEST) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Jeff King cc: git@vger.kernel.org, Junio C Hamano Subject: Re: [PATCH 4/4] cat-file: support --textconv/--filters in batch mode In-Reply-To: <20160818220530.2dcsag4qeitia4ao@sigill.intra.peff.net> Message-ID: References: <2315ae5ab6918a7c1567f11a64093a860983bc20.1471524357.git.johannes.schindelin@gmx.de> <20160818220530.2dcsag4qeitia4ao@sigill.intra.peff.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K0:9Tar8vGv3PGLi0OF8rfy9WtD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.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Peff, On Thu, 18 Aug 2016, Jeff King wrote: > On Thu, Aug 18, 2016 at 02:46:28PM +0200, Johannes Schindelin wrote: > > > With this patch, --batch can be combined with --textconv or --filters. > > For this to work, the input needs to have the form > > > > > > > > so that the filters can be chosen appropriately. > > The object name can have spaces in it, too. E.g.: > > HEAD:path with spaces > > or even: > > :/grep for this > > (as was pointed out to me when I tried to turn on %(rest) handling by > default, long ago). How do those work with your patch? They don't ;-) And quite frankly, the documentation should make it clear to users that batch mode with --filters or --textconv won't work when the object name contains white space: it says that the object name is split from the path at the first white space character. > It looks like the extra split isn't enabled unless one of those options > is selected. Since --filters is new, that's OK for backwards > compatibility. But --textconv isn't. Except that it is okay, because --textconv *was not even supported in batch mode*. So there is no backwards compatibility that could be broken. > I wonder if we need an option specifically to say "the object name can > be split". Right now it kicks in automatically if you use "%(rest)" in > your format, but you might not care about passing along that output > (e.g., a lot of times I am piping "rev-list" straight to cat-file, and I > have to use a separate "cut" to throw away the pathnames). As I said elsewhere in this thread: if anybody encounters that problem, they are welcome to fix it themselves. My patch series purpose is to introduce --filters and make it compatible with the batch mode. As I imitated --textconv, it was both easy and correct to make it compatible with the batch mode, too. But that is the extent of this here patch series. Fixing %(rest) for object names containing spaces is distinctly outside the original intent, and certainly outside of my use case. Ciao, Dscho