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=-5.3 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,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 288E41F506 for ; Tue, 20 Sep 2022 14:36:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231391AbiITOgA (ORCPT ); Tue, 20 Sep 2022 10:36:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230488AbiITOf6 (ORCPT ); Tue, 20 Sep 2022 10:35:58 -0400 Received: from siwi.pair.com (siwi.pair.com [209.68.5.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BCF54B4A3 for ; Tue, 20 Sep 2022 07:35:57 -0700 (PDT) Received: from siwi.pair.com (localhost [127.0.0.1]) by siwi.pair.com (Postfix) with ESMTP id 5BAE1CA126B; Tue, 20 Sep 2022 10:35:56 -0400 (EDT) Received: from jeffhost-mbp.local (addr-66.249.231.194.nptpop-cmts01-cable-sub.rdns-bnin.net [66.249.231.194]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by siwi.pair.com (Postfix) with ESMTPSA id 0191DCC8319; Tue, 20 Sep 2022 10:35:55 -0400 (EDT) Subject: Re: [PATCH v7 2/6] fsmonitor: relocate socket file if .git directory is remote To: Eric DeCosta , Junio C Hamano Cc: Eric DeCosta via GitGitGadget , "git@vger.kernel.org" , Eric Sunshine , =?UTF-8?Q?Torsten_B=c3=b6gershause?= =?UTF-8?Q?n?= , =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFz?= =?UTF-8?Q?on?= , Ramsay Jones , Johannes Schindelin References: <075340bd2a713905d8bee4f53765dcbcba9a17c4.1663358014.git.gitgitgadget@gmail.com> <5c50a3cf-c5ac-6b11-2548-8400e5574b32@jeffhostetler.com> <40b47246-adb6-cf56-02ef-25ab1429a42e@jeffhostetler.com> From: Jeff Hostetler Message-ID: <454ed375-471e-44b9-f636-d1992e4a3c34@jeffhostetler.com> Date: Tue, 20 Sep 2022 10:35:55 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: mailmunge 3.09 on 209.68.5.199 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 9/19/22 7:51 PM, Eric DeCosta wrote: > > >> -----Original Message----- >> From: Junio C Hamano >> Sent: Monday, September 19, 2022 1:49 PM >> To: Jeff Hostetler >> Cc: Eric DeCosta via GitGitGadget ; >> git@vger.kernel.org; Eric Sunshine ; Torsten >> Bögershausen ; Ævar Arnfjörð Bjarmason >> ; Ramsay Jones ; >> Johannes Schindelin ; Eric DeCosta >> >> Subject: Re: [PATCH v7 2/6] fsmonitor: relocate socket file if .git directory is >> remote >> >> 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. > > Appreciate all the insights and comments. Where are we landing with this? Very close to the finish line and I'd like to be able to push these changes over that line. > > -Eric > I'm OK doing it either way. Junio seems to prefer the BUG() version, so let's go with that. That lets us make progress on getting rid of direct references to "the_repository". Jeff