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.8 required=3.0 tests=AWL,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.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 117051F506 for ; Mon, 19 Sep 2022 17:49:32 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="QAM8Y4aQ"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230143AbiISRt2 (ORCPT ); Mon, 19 Sep 2022 13:49:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230034AbiISRt0 (ORCPT ); Mon, 19 Sep 2022 13:49:26 -0400 Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86737402F8 for ; Mon, 19 Sep 2022 10:49:25 -0700 (PDT) Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id BF09314EB1D; Mon, 19 Sep 2022 13:49:24 -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=fCa1PD+WWRlnsxCrAxGUzR7kDGd1l3uz5uBiF+ CTxus=; b=QAM8Y4aQmF+Z71Zk4dOt7n8ZD4GNk4vCx3ehhclB8VexyKgN2CWGkt NlQIoZNIMrSYlZspNUmNhYPVciAglMf4VFF9VTMKAst571R+ayhkZXERLGwPbV2d 9cfDKWoKcAIs8yHJwiG6PH6urOh1dWpQ9zeuKTI04elmGTxGwI0Wg= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id B6E6014EB1C; Mon, 19 Sep 2022 13:49:24 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.83.5.33]) (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 3237314EB1B; Mon, 19 Sep 2022 13:49:24 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Jeff Hostetler Cc: Eric DeCosta via GitGitGadget , git@vger.kernel.org, Eric Sunshine , Torsten =?utf-8?Q?B=C3=B6gershausen?= , =?utf-8?B?w4Z2YXIgQXJu?= =?utf-8?B?ZmrDtnLDsA==?= Bjarmason , Ramsay Jones , Johannes Schindelin , Eric DeCosta Subject: Re: [PATCH v7 2/6] fsmonitor: relocate socket file if .git directory is remote References: <075340bd2a713905d8bee4f53765dcbcba9a17c4.1663358014.git.gitgitgadget@gmail.com> <5c50a3cf-c5ac-6b11-2548-8400e5574b32@jeffhostetler.com> <40b47246-adb6-cf56-02ef-25ab1429a42e@jeffhostetler.com> Date: Mon, 19 Sep 2022 10:49:23 -0700 In-Reply-To: <40b47246-adb6-cf56-02ef-25ab1429a42e@jeffhostetler.com> (Jeff Hostetler's message of "Mon, 19 Sep 2022 13:08:53 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 65EB265A-3843-11ED-8046-2AEEC5D8090B-77302942!pb-smtp1.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Jeff Hostetler writes: > Aren't we in the middle of a transition from always > using the global "the_repository" to a passed "r" variable? > We're getting closer to being able to hide the the global > symbol, but we're not there yet, right? We may still have code that works ONLY on the_repository, but letting a function take "r" and lettin it ignore is worse than leaving it explicitly limited to the_repository only, no? > I'm thinking that at as long as the global exists, we are not > safe to have multiple "struct repository" instances, right? By itself, Not at all. It is the code like I am criticizing that makes it unsafe. I do not mind adding if (!r) BUG(...); at the place you have the "sweep it under the rug" band-aid, though.