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,RCVD_IN_DNSWL_NONE,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 A336D1F8C6 for ; Fri, 2 Jul 2021 15:28:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231929AbhGBPae (ORCPT ); Fri, 2 Jul 2021 11:30:34 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:54457 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbhGBPab (ORCPT ); Fri, 2 Jul 2021 11:30:31 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 683B3BCA37; Fri, 2 Jul 2021 11:27:58 -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; s=sasl; bh=kAwAGjafXhscA/nXLQ/P7IIu6TWuA1bL6yzgzY XHfis=; b=SE3N24Uim/Nm2FnEfzY9Q3ns+njbgQmuEe0amqTM7hT3C+6eVEXIqR uRJDxIKgdHzxz0YhfLjJgjIcbfxe8g4OCit6VlOeWpq9v3D2D5iizBirdurxMJ3S MgXZSOdKKHId2yK57XtewsWjB/QtyBDoTCNIT1quSBslGRQzWSShI= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 5857FBCA36; Fri, 2 Jul 2021 11:27:58 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.3.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id D6CC5BCA34; Fri, 2 Jul 2021 11:27:57 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: ZheNing Hu Cc: ZheNing Hu via GitGitGadget , Git List , Christian Couder , Hariom Verma , Bagas Sanjaya , Jeff King , =?utf-8?B?w4Z2YXIg?= =?utf-8?B?QXJuZmrDtnLDsA==?= Bjarmason Subject: Re: [PATCH 14/15] [GSOC] cat-file: re-implement --textconv, --filters options References: <3aeb4d3d3ec9dc112a19a8b4adeaf213577b4028.1625155693.git.gitgitgadget@gmail.com> Date: Fri, 02 Jul 2021 08:27:57 -0700 In-Reply-To: (ZheNing Hu's message of "Fri, 2 Jul 2021 20:46:15 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 14436DB4-DB4A-11EB-94F6-8B3BC6D8090B-77302942!pb-smtp1.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org ZheNing Hu writes: >> These global variables are problematic. The places that check them >> are quite isolated, and it makes me wonder why we cannot pass a >> format instance through the callchain down to get_object(). > > If we pass such two options In such a deep call chain, it seems not > worth to do it. OK. After all, ref-filter.c has too many existing global variables (starting from the used_atom[] array) that makes it impossible to be a proper API that can be used to handle more than one invocations at once, so two more globals aren't making it any more hopeless than it currently is. If we wanted to make the API reentrant, we'd need a bigger change anyway. > Or just use "static" prefix? Yes, that is needed regardless to pass "make sparse". TShanks.