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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.5 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 6DFF41F727 for ; Tue, 28 Jun 2022 15:21:38 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="M0yFeWjw"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347783AbiF1PTb (ORCPT ); Tue, 28 Jun 2022 11:19:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346610AbiF1PT3 (ORCPT ); Tue, 28 Jun 2022 11:19:29 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13125326F5 for ; Tue, 28 Jun 2022 08:19:29 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id u15so26446091ejc.10 for ; Tue, 28 Jun 2022 08:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:reply-to:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=xH5MprAAvp78kgX3KWkywlGpiEBoOnNn9GcVFjRPPkQ=; b=M0yFeWjwRJbkbHrcintmEufs9eB4lwQP4/E8I0zqe0z5pytUUQefMfrhfX1phUN1Dh RJ5k7L1pJj4jpan7Pcy5iye1RO8JTE/Ig+GNlQnDGQqmX/PGT18+ZuKETzc527WJnnpy WZ6wGynfzaTnUDWDdzxBNb8sIcFssNPm1mj3W3yAdGr1OWFgtNAQJuPLotY5NAj14E/A ER+lRv0n41YZQHzZYLLDTQLFcIyKBBi/ROWtsad+gqqr1SMb9wggD4WpULucerhSpGB1 Y6Rd83zQRL1yf9HI39w9OXWIXyfifyDg/oco9kPCr75LGP7jEahfBaKsIn/0t56Gt6l+ 97sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:reply-to :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=xH5MprAAvp78kgX3KWkywlGpiEBoOnNn9GcVFjRPPkQ=; b=P/zMuaSpgWMMGry/mbmIvknIs6OCjC5rhEsfCIAX10GyfaMXNTUYQZnsLZ0zGKaTcr QoyNR5sssO6VdO6VOqC+8FjMBP1uVchq3Gpa4cm9eCBnNcY7v994WWwOIZSIbeC1PXJ8 R/ra7ew/0+5HbgKhU/S9lY5GDYMYUNJB04EksO8ZJNI8MfvTOpMB60Nh/XO7q3HpzpJ3 hARnF3l4HvD9/f4L17IewXl1xZT58OOAt/xImhj1u5WPfddg7vwXgxKgaE6IlwL0cNrb xGNJJ7JOJGvWawR+qKkW2yTmTrSVn8PCRiJ2W9xDg2eG6xLCyR02H/iB+hqqJImt3Hym 3RIQ== X-Gm-Message-State: AJIora8pCj+5fqk/95GtXVqpbJEraYL1+d8FtM6GVv7a0pNGPYcx8/kr 1mUg1yWDeW9n3P8/vfdB0CgNqJgZaM8= X-Google-Smtp-Source: AGRyM1sKoGzrJGPbUpHdYOQqv+A2CVoiIk7ih337fnFfWGFhdZHuFFPYsMOS4SOzkXqYP2PN/oBgOw== X-Received: by 2002:a17:906:9c82:b0:6e1:2c94:1616 with SMTP id fj2-20020a1709069c8200b006e12c941616mr18559807ejc.64.1656429567580; Tue, 28 Jun 2022 08:19:27 -0700 (PDT) Received: from [192.168.1.240] ([31.185.185.192]) by smtp.gmail.com with ESMTPSA id t12-20020a50d70c000000b0043590660f16sm9870515edi.35.2022.06.28.08.19.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Jun 2022 08:19:27 -0700 (PDT) Message-ID: Date: Tue, 28 Jun 2022 16:19:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Reply-To: phillip.wood@dunelm.org.uk Subject: Re: [PATCH v4] ls-files: introduce "--format" option Content-Language: en-GB-large To: ZheNing Hu via GitGitGadget , git@vger.kernel.org Cc: Junio C Hamano , Christian Couder , =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , ZheNing Hu References: From: Phillip Wood In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi ZheNing This looks good, I don't have much to add beyond the comments others have left. On 26/06/2022 16:29, ZheNing Hu via GitGitGadget wrote: > From: ZheNing Hu > +FIELD NAMES > +----------- > +Various values from structured fields can be used to interpolate > +into the resulting output. For each outputting line, the following > +names can be used: > + > +objectmode:: > + The mode of the file which is recorded in the index. > +objectname:: > + The name of the file which is recorded in the index. > +stage:: > + The stage of the file which is recorded in the index. > +eolinfo:index:: > + The of the file which is recorded in the index. > +eolinfo:worktree:: > + The of the file which is recorded in the working tree. > +eolattr:: > + The of the file which is recorded in the index. > +path:: > + The pathname of the file which is recorded in the index. I think starting with this shorter list of field names is a good idea, we can always add more fields later if there is a demand for %(flags) etc. > +test_expect_success 'git ls-files --format with --debug' ' > + git ls-files --debug >expect && > + git ls-files --format="%(path)" --debug >actual && > + test_cmp expect actual > +' What's the motivation for being able to combine --format with --debug? Best Wishes Phillip