On 12/20/2021 10:57 AM, Derrick Stolee via GitGitGadget wrote: > From: Derrick Stolee <dstolee@xxxxxxxxxxxxx> ... > + /* > + * Ensure that core.bare reflects the current worktree, since the > + * logic for is_bare_repository() changes if extensions.worktreeConfig > + * is disabled. > + */ > + if ((res = git_config_set_multivar_in_file_gently(config_filename, "core.bare", > + r->worktree ? "false" : "true", > + NULL, 0))) { > + error(_("unable to set core.bare setting in worktree config")); > + return res; > + } As mentioned by Eric, this portion isn't correct. It fixes _this_ worktree, but any other existing worktrees would become broken. The fix would be to detect if the core config file has core.bare=false and then to move that setting into the base repo's config.worktree file. I believe that if we do that change, then the rest of this patch series is valid. What do others think? Thanks, -Stolee