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.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 A3CA71F953 for ; Tue, 21 Dec 2021 02:11:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230401AbhLUCLR (ORCPT ); Mon, 20 Dec 2021 21:11:17 -0500 Received: from pb-smtp21.pobox.com ([173.228.157.53]:58688 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbhLUCLQ (ORCPT ); Mon, 20 Dec 2021 21:11:16 -0500 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 2D179171A58; Mon, 20 Dec 2021 21:11:16 -0500 (EST) (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=83NGC0ApJeWj o0MpdLxJ6t6rpMMvrqr9oGl+Nulqrco=; b=CMCxrfz00WrdQqoOrYB8yAQUPTjp LnuYQn1C+e+A3qC4pz/6C2fpz4cjvLLqqkBzD4tuSULYkfZEDKWlfyX07ds1mXZO u8HXKynT/+/cbcCawLQBnfX9Z7xhlK+wcMg3s3/sMJSGZK4VnQes5Z01cVKKVPef 1YaASgGYfULtsTI= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 27385171A57; Mon, 20 Dec 2021 21:11:16 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [104.133.2.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 8F0A6171A54; Mon, 20 Dec 2021 21:11:09 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Cc: git@vger.kernel.org, Han Xin , Jeff King , Philip Oakley , Derrick Stolee Subject: Re: [RFC PATCH] object-file API: add a format_loose_header() function References: <20211217112629.12334-3-chiyutianyi@gmail.com> <211221.86wnjyspd3.gmgdl@evledraar.gmail.com> Date: Mon, 20 Dec 2021 18:11:08 -0800 In-Reply-To: <211221.86wnjyspd3.gmgdl@evledraar.gmail.com> (=?utf-8?B?IsOG?= =?utf-8?B?dmFyIEFybmZqw7Zyw7A=?= Bjarmason"'s message of "Tue, 21 Dec 2021 02:42:44 +0100") 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: 4359C054-6203-11EC-B41F-CBA7845BAAA9-77302942!pb-smtp21.pobox.com Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason writes: > I've got some patches locally to convert e.g. write_object_file() to us= e > the enum, and it removes the need for some callers to convert enum to > char *, only to have other things convert it back. > > So I think for any new APIs it makes sense to work towards sidelining > the hash-object.c --literally caller. Your logic is backwards to argue "because I did something this way, it makes sense to do it this way"?