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.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 34A311F953 for ; Tue, 21 Dec 2021 05:59:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233143AbhLUF7y (ORCPT ); Tue, 21 Dec 2021 00:59:54 -0500 Received: from mail-pg1-f177.google.com ([209.85.215.177]:37481 "EHLO mail-pg1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233079AbhLUF7x (ORCPT ); Tue, 21 Dec 2021 00:59:53 -0500 Received: by mail-pg1-f177.google.com with SMTP id a23so11400186pgm.4 for ; Mon, 20 Dec 2021 21:59:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gUi4KIkbPyh9S2UqBhxHz4InFBI9scdtN3MFeUDj1oA=; b=LD6Uhm1MktdfBa3VzO9WHZ/VjeqbQh/RaQaALrqfbnXXP5k01wjRtQMhgt1HIOZG5s zKnGUbzwEdeqFJHm0aCP4C0EQShFrh/Gzg/KWURt8RFF/VTvQZLseuPsWmLGEBMFh38W rderdLddIM4lPKDMxtbfjrglKNkU1epYsI/MF+mzFuzYByjQLyZ7aHlGdj9/HP3bkviT 8Nsr9zN0g9UlmVtuCt8pahlH5EpwMe++r333a+PMqFCp+WdgwBJ2QHBB4CAEL+znaq2D 0liS8+ikzWs5BfwdiLqAuFwNBZRe+1xrQiotG4iazNVPbqF4nxfSDPGG0hEvK/J52+Ab UDow== X-Gm-Message-State: AOAM531bGOWkgoTmmJ3DAknBlyyfaVolfblwPhy1Vb1p94iOu/BLNs2l 2/3NTBrMEyqD+H6mgwJunZBgQpxRgI2jIO45xGc= X-Google-Smtp-Source: ABdhPJzXKw352nWlAqMjUGE1bgvPlfaJaFNsnbd6RTV6ZhZnYc3xHiGsdn0mRdKnEdfkvL8l4G0TWuMhcKLdVRBrY0o= X-Received: by 2002:a63:380e:: with SMTP id f14mr1558292pga.227.1640066392881; Mon, 20 Dec 2021 21:59:52 -0800 (PST) MIME-Version: 1.0 References: <67993f6cff254d341ba4ad7fe7709b57eb3e74d4.1640015844.git.gitgitgadget@gmail.com> <6d72a020-ded7-6ef2-825c-ce6421194b26@gmail.com> In-Reply-To: From: Eric Sunshine Date: Tue, 21 Dec 2021 00:59:42 -0500 Message-ID: Subject: Re: [PATCH 3/4] config: add repo_config_set_worktree_gently() To: Derrick Stolee Cc: Derrick Stolee via GitGitGadget , Git List , Sean Allred , Junio C Hamano , Derrick Stolee , Derrick Stolee Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Mon, Dec 20, 2021 at 7:01 PM Eric Sunshine wrote: > Regarding the actual "fix": we want a new utility function which > enables per-worktree configuration and handles all the required > bookkeeping actions described in git-worktree.txt. Specifically, if > per-worktree configuration is not already enabled, the function will > need to: > > (1) set `extensions.worktreeConfig=true` in .git/config > > (1) relocate `core.bare` from .git/config to .git/config.worktree if > that key exists > > (2) relocate `core.worktree` from .git/config to .git/config.worktree > if that key exists A couple additional notes: First, I can't count to three. Second, item (0) in the above list would be to upgrade the repository to version 1 since that's a prerequisite of using `extensions` (which you know already, but I want to be clear for any other readers that the new utility function should perform this step, as well).