Re: [PATCH] submodule absorbing: fix worktree/gitdir pointers recursively for non-moves

2017-01-24 Thread Stefan Beller
On Tue, Jan 24, 2017 at 1:58 PM, Brandon Williams wrote: > On 01/24, Stefan Beller wrote: >> + if (read_gitfile_gently(old_git_dir, _code) || >> + err_code == READ_GITFILE_ERR_NOT_A_REPO) { >> + /* >> + * If it is an actual gitfile, it

Re: [PATCH] submodule absorbing: fix worktree/gitdir pointers recursively for non-moves

2017-01-24 Thread Brandon Williams
On 01/24, Stefan Beller wrote: > On Tue, Jan 24, 2017 at 1:58 PM, Brandon Williams wrote: > > On 01/24, Stefan Beller wrote: > >> + if (read_gitfile_gently(old_git_dir, _code) || > >> + err_code == READ_GITFILE_ERR_NOT_A_REPO) { > >> + /* > >> +

Re: [PATCH] submodule absorbing: fix worktree/gitdir pointers recursively for non-moves

2017-01-24 Thread Brandon Williams
On 01/24, Stefan Beller wrote: > + if (read_gitfile_gently(old_git_dir, _code) || > + err_code == READ_GITFILE_ERR_NOT_A_REPO) { > + /* > + * If it is an actual gitfile, it doesn't need migration, > + * however in case of a recursively nested

[PATCH] submodule absorbing: fix worktree/gitdir pointers recursively for non-moves

2017-01-24 Thread Stefan Beller
Consider having a submodule 'sub' and a nested submodule at 'sub/nested'. When nested is already absorbed into sub, but sub is not absorbed into its superproject, then we need to fixup the gitfile and core.worktree setting for 'nested' when absorbing 'sub', but we do not need to move its git dir