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=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 1E9131F452 for ; Fri, 5 May 2023 22:30:49 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=PmscEmHE; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233337AbjEEWaq (ORCPT ); Fri, 5 May 2023 18:30:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232766AbjEEWap (ORCPT ); Fri, 5 May 2023 18:30:45 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25EB25244 for ; Fri, 5 May 2023 15:30:40 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-51b0f9d7d70so2147856a12.1 for ; Fri, 05 May 2023 15:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683325839; x=1685917839; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=FCS8vmtq0oFMqd/uqbsCMeA0ezBrXdC4lpU0a67aZ70=; b=PmscEmHEeJOnpntREp8b620qZh50q9a6l44DfciNv+CtTwfj8cG5uQq74jVtUmec2F EpcJsFkMVFV2kY9q6VqnJRiMEe9/IWkTB9LWN9zCN6IqbKoNZ9dvYk6O/+cr8oXIrs4L H2yZ6epuR5eq5CjOZaCghuVY8qjr2/eQvWlcdewMiGpWRxaKOdjSrO+g1Qi2OaIhI81Y AUMjmo+eAKEVSBTyiLj6b6RNnmMZsWmz3ubwXmegQbs5zEbh0xWqgnM02AtyT+s+soNx /tca6iuCUgrrvvFxecm7Nyb/HsEnI5Fr1aXFOehDa4+M2IXj3UkZLtX5ZTuAYkDcHWSk EeCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683325839; x=1685917839; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:sender:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=FCS8vmtq0oFMqd/uqbsCMeA0ezBrXdC4lpU0a67aZ70=; b=UaVNv9A0tY9dkoFZPNWSQWbJ6nstv7k8/Yi/fbfnj9Irxf0i9PP518Pov1jqnJ77Su ZxVCuE7AX8br5Mkdcsrs7kgnpvwzeauQ/ODNzszHHY+1S5pBqP5+/tgBO1pSvwx+y1Sf Qkh0e5p0rUWGJC81k7Un1xeZGWHR8/4wV5Itz9/5vIK7V8NcjEDK49ExwehdmaeNChZq oZgmDtbu8jcIwl7r831YP31aK14vpvhMYwvZwazeaSn+X/DkfykMgdCI+kKeiyHwdSKG SaSFlYumu8fuAu290wrcElnn5noj8W8/04Xqpcf2lV3tYNYrouhbdfmeyICkDG1sArg0 VUQg== X-Gm-Message-State: AC+VfDwXGYQaz/HgNSAJwkwTI8UN8D4i1Qzb87wKDY2pq5IC5RTxCEdd gEEhmeAM52N9/V0WwMqq+3o= X-Google-Smtp-Source: ACHHUZ4bXGTev5zzY+A88iW9j+lqsk2E2t5JKkSNawK+av8Q1SLmZRCvva0AtNXDaDYIvibVs7OXmQ== X-Received: by 2002:a17:902:ea03:b0:19f:2dff:2199 with SMTP id s3-20020a170902ea0300b0019f2dff2199mr3109622plg.68.1683325839451; Fri, 05 May 2023 15:30:39 -0700 (PDT) Received: from localhost (187.137.203.35.bc.googleusercontent.com. [35.203.137.187]) by smtp.gmail.com with ESMTPSA id z12-20020a170903018c00b001aae64e9b36sm2264759plg.114.2023.05.05.15.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 15:30:38 -0700 (PDT) Sender: Junio C Hamano From: Junio C Hamano To: Josh Steadmon Cc: git@vger.kernel.org, chooglen@google.com Subject: Re: [PATCH v3] setup: trace bare repository setups References: Date: Fri, 05 May 2023 15:30:38 -0700 In-Reply-To: (Josh Steadmon's message of "Mon, 1 May 2023 10:30:37 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Josh Steadmon writes: > From: Glen Choo > > safe.bareRepository=explicit is a safer default mode of operation, since > it guards against the embedded bare repository attack [1]. Most end > users don't use bare repositories directly, so they should be able to > set safe.bareRepository=explicit, with the expectation that they can > reenable bare repositories by specifying GIT_DIR or --git-dir. > > However, the user might use a tool that invokes Git on bare repositories > without setting GIT_DIR (e.g. "go mod" will clone bare repositories > [2]), so even if a user wanted to use safe.bareRepository=explicit, it > wouldn't be feasible until their tools learned to set GIT_DIR. > > To make this transition easier, add a trace message to note when we > attempt to set up a bare repository without setting GIT_DIR. This allows > users and tool developers to audit which of their tools are problematic > and report/fix the issue. When they are sufficiently confident, they > would switch over to "safe.bareRepository=explicit". > > Note that this uses trace2_data_string(), which isn't supported by the > "normal" GIT_TRACE2 target, only _EVENT or _PERF. > > [1] https://lore.kernel.org/git/kl6lsfqpygsj.fsf@chooglen-macbookpro.roam.corp.google.com/ > [2] https://go.dev/ref/mod > > Signed-off-by: Glen Choo > Signed-off-by: Josh Steadmon > --- > I'm sending a lightly-adapted version of Glen's tracing patch because > Glen will be on vacation next week and we'd like to get this upstream > ASAP. > > Changes in V3: added a test_unconfig test case for safe.bareRepository > Changes in V2: cleaned up test-style issues. Thanks. We saw no interest on the list in reviewing this patch further, it seems, but I didn't see anything glaringly wrong, see no reason not to merge it, and this should help noticing potential issues by $corp folks, I would presume, so let's merge it as-is.