Re: [PATCH 3/4] config: add repo_config_set_worktree_gently()
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Dec 21, 2021, 05:59 UTC
- Message-ID
- <CAPig+cT7bf7yyO-BpobSgHiXk703sPEa3n-toNMUG=ixjUqCsw@mail.gmail.com>
- In-Reply-To
- <CAPig+cTuLYFc9fpAe8Uq9fvBYuSGcc9SA1O-q1BRw0DYxDF4Eg@mail.gmail.com>
On Mon, Dec 20, 2021 at 7:01 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 13 quoted lines
> 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).