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=-0.1 required=3.0 tests=AWL,BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,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 CDD341F727 for ; Mon, 27 Jun 2022 15:43:50 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="Hbur21NP"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238496AbiF0Plj (ORCPT ); Mon, 27 Jun 2022 11:41:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238485AbiF0Pli (ORCPT ); Mon, 27 Jun 2022 11:41:38 -0400 Received: from pb-smtp20.pobox.com (pb-smtp20.pobox.com [173.228.157.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B091211A29 for ; Mon, 27 Jun 2022 08:41:37 -0700 (PDT) Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 945E8192408; Mon, 27 Jun 2022 11:41:35 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=eC4DiRdgOIB+ bzAB/jpvbrfCpnzuIgAw6H0ZJ9eJhq4=; b=Hbur21NPrh2XP7pUHZ83w/rZX4D8 SIx4RnmPm3IQNPDW2BbnsCnG5HYfInp3AbYulmKcVkJqQeg/jUb0jsZsQR4KX1L0 ahNINRiARcrHJh0jeFLGuMawycBZIZQJZFiui4DnQkVX9MIlWEH93OQokJ670c6m 1E93rhGb7IZEoPk= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 8C178192406; Mon, 27 Jun 2022 11:41:35 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.82.80.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 1AC6B192405; Mon, 27 Jun 2022 11:41:32 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: ZheNing Hu Cc: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , ZheNing Hu via GitGitGadget , Git List , Christian Couder , Phillip Wood Subject: Re: [PATCH v3] ls-files: introduce "--format" option References: <220624.86letmi383.gmgdl@evledraar.gmail.com> Date: Mon, 27 Jun 2022 08:41:30 -0700 In-Reply-To: (ZheNing Hu's message of "Mon, 27 Jun 2022 19:06:25 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: 9E4B656A-F62F-11EC-855A-C85A9F429DF0-77302942!pb-smtp20.pobox.com Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org ZheNing Hu writes: > Junio C Hamano =E4=BA=8E2022=E5=B9=B46=E6=9C=8827=E6= =97=A5=E5=91=A8=E4=B8=80 16:22=E5=86=99=E9=81=93=EF=BC=9A >> >> ZheNing Hu writes: >> >> >> >> + else if (skip_prefix(start, "(path)", &p)) >> >> >> + write_name_to_buf(sb, data->pathname); >> >> >> >> These are just "values". >> >> ... >> >> >> + else if (skip_prefix(start, "(size)", &p)) >> >> >> + strbuf_addf(sb, "size: %u", sd->sd_size); >> >> >> + else if (skip_prefix(start, "(flags)", &p)) >> >> >> + strbuf_addf(sb, "flags: %x", data->ce->ce_flags); >> >> >> >> These are not. >> >> >> > ... If someone else >> > need them for some reason, we can add them back. >> >> If someone else needs to see "size:" printed in front of the value >> of sd_size member, we DO NOT HAVE TO DO ANYTHING! That someone else >> can write "--format=3Dsize: %(size)" to do so themselves. > > Oh, sorry, I mean if someone need some atoms from %(size) to %(flags), = we can > add them back. Ah, I see. I am not sure about the %(flags) to help the debugging mode, but giving a single bit "is it dirty?" would be more useful than giving the cached stat info, I would think. Thanks.