From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 786E81F5A0 for ; Sat, 11 Feb 2023 07:53:41 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=80x24.org header.i=@80x24.org header.a=rsa-sha256 header.s=selector1 header.b=H7D6FCvp; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229655AbjBKHxi (ORCPT ); Sat, 11 Feb 2023 02:53:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbjBKHxg (ORCPT ); Sat, 11 Feb 2023 02:53:36 -0500 Received: from dcvr.yhbt.net (dcvr.yhbt.net [173.255.242.215]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EFDF305E9 for ; Fri, 10 Feb 2023 23:53:34 -0800 (PST) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id ABC921F5A0; Sat, 11 Feb 2023 07:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1676102014; bh=jCjHfMt8j3K7sD6PLVbL/mluoCE6NFZQfCBwfo8egbs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H7D6FCvpCT67SHeifnqYqSsBIFtehpu/sLX6C0MeedleB+TX8mFQzB+NiYVyXpo8o LfREOF/hZ/MNww4ZWT5byFQPCu+mpRWpV3/m0hJAUSze9BxfYzMFLwuV6DZRQQV6Xs 3ELhdJrdzP5PoNxg3t8LC6r/yLohblXP0odeEYY4= Date: Sat, 11 Feb 2023 07:53:33 +0000 From: Eric Wong To: Junio C Hamano Cc: git@vger.kernel.org, Patrick Steinhardt Subject: Re: [RFC] fetch: support hideRefs to speed up connectivity checks Message-ID: <20230211075333.M933000@dcvr> References: <20230209122857.M669733@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Junio C Hamano wrote: > I however notice error handling in the codepath that deals with > "--exclude-hidden" is a bit sloppy. > > refs.c::parse_hide_refs_config() is nice enough to diagnose a > malformed transfer.hiderefs configuration as an error by returning > -1, and revision.c::hide_refs_config() propagates such an error up, > but revision.c::exclude_hidden_refs() ignores the error from > git_config(), and revision.c::handle_revision_pseudo_opt() ignores > any error from exclude_hidden_refs() anyway. Not sure I follow. exclude_hidden_refs() either dies or calls git_config(). git_config() calls repo_config(), then configset_iter(). configset_iter() will git_die_config_linenr() if `fn' (hide_refs_config() in this case) returns < 0. > We may want to tighten it a bit before (ab)using the option in more > contexts. > > Thanks.