Re: [PATCH v3 6/6] worktree add: switch to worktree version 1
- From
Max Kirillov <max@max630.net>
- Date
- Feb 2, 2016, 05:35 UTC
- Message-ID
- <20160202053547.GF4978@wheezy.local>
- In-Reply-To
- <CACsJy8Am7rQ=pm0C7bw0gQ=aic3opmBos+3+1Awrko8TT2uHrg@mail.gmail.com>
On Mon, Feb 01, 2016 at 01:05:05PM +0700, Duy Nguyen wrote:
Show 5 quoted lines
> On Mon, Feb 1, 2016 at 12:33 PM, Max Kirillov <max@max630.net> wrote: >> 1. For submodules (which must be left per-worktree) this >> approach is not going to work, because you don't know all >> variables in advance. You could scan the config file and >> match those actual keys which are there with patterns.
> Hmm.. we could keep existing submodule.* per-worktree. New variables > are per-worktree by default, unless you do "git config --repo" in > git-submodule.sh. Am I missing something?
Submodules in new worktree should be not initialized, and as far as I understand this means that submodule variables should be removed from common config.
I used test from http://article.gmane.org/gmane.comp.version-control.git/266621 to verify expectations for submodules.
Show 7 quoted lines
>> 2. This migrates variables to the default (or current?) >> worktree, what about others existing? > > In v0, $C/config contains all shared variables, once we move these > shared vars to $C/common/config, they will be visible to all other > worktrees. Or do you replicate per-worktree vars in $C/config to all > worktrees ?
If would make sense for some variables definitely. For example, the submodule related variables.
-- Max