Re: [PATCH v3 6/6] worktree add: switch to worktree version 1

2016-02-01 Thread Max Kirillov
On Mon, Feb 01, 2016 at 01:05:05PM +0700, Duy Nguyen wrote: > On Mon, Feb 1, 2016 at 12:33 PM, Max Kirillov 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 >>

Re: [PATCH v3 6/6] worktree add: switch to worktree version 1

2016-01-31 Thread Duy Nguyen
On Mon, Feb 1, 2016 at 12:33 PM, Max Kirillov wrote: > On Tue, Jan 26, 2016 at 06:44:45PM +0700, Nguyễn Thái Ngọc Duy wrote: >> + for (key_p = per_wortree_keys; *key_p; key_p++) { >> + const char *key = *key_p; >> + char *value = get_key(sb.buf,

Re: [PATCH v3 6/6] worktree add: switch to worktree version 1

2016-01-31 Thread Max Kirillov
On Tue, Jan 26, 2016 at 06:44:45PM +0700, Nguyễn Thái Ngọc Duy wrote: > + for (key_p = per_wortree_keys; *key_p; key_p++) { > + const char *key = *key_p; > + char *value = get_key(sb.buf, key); > + > + if (value) { > +

[PATCH v3 6/6] worktree add: switch to worktree version 1

2016-01-26 Thread Nguyễn Thái Ngọc Duy
The most obvious use case is, "git worktree add" creates the first linked worktree. In this case, we should be able to move to latest worktree version. The following happens: - common/config is created with extensions.worktree 1 and core.repositoryformatversion 1 - all config keys except a f