Re: [PATCHv2 4/4] submodule: add embed-git-dir function

2016-11-30 Thread Junio C Hamano
Stefan Beller writes: > On Wed, Nov 30, 2016 at 1:39 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> git relocate-git-dir (--into-workingtree|--into-gitdir) \ >> >> I am not sure if you meant this as a submodule-specific

Re: [PATCHv2 4/4] submodule: add embed-git-dir function

2016-11-30 Thread Stefan Beller
On Wed, Nov 30, 2016 at 1:39 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> git relocate-git-dir (--into-workingtree|--into-gitdir) \ > > I am not sure if you meant this as a submodule-specific subcommand > or more general helper.

Re: [PATCHv2 4/4] submodule: add embed-git-dir function

2016-11-30 Thread Junio C Hamano
Stefan Beller writes: > git relocate-git-dir (--into-workingtree|--into-gitdir) \ I am not sure if you meant this as a submodule-specific subcommand or more general helper. "into-workingtree" suggests to me that it is submodule specific, so I'll base my response on that

Re: [PATCHv2 4/4] submodule: add embed-git-dir function

2016-11-30 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Nov 23, 2016 at 2:22 AM, Stefan Beller wrote: >> +/* >> + * Migrate the given submodule (and all its submodules recursively) from >> + * having its git directory within the working tree to the git dir nested >> + * in its

Re: [PATCHv2 4/4] submodule: add embed-git-dir function

2016-11-30 Thread Stefan Beller
On Wed, Nov 30, 2016 at 10:04 AM, Stefan Beller wrote: >> Submodules and worktrees seem to have many things in common. > > Yes. :) I moved the code to dir.{c,h} and renamed it to a more generic "move_gitdir", but then I am thinking further about how to align worktrees and

Re: [PATCHv2 4/4] submodule: add embed-git-dir function

2016-11-30 Thread Stefan Beller
On Wed, Nov 30, 2016 at 12:51 PM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Wed, Nov 23, 2016 at 2:22 AM, Stefan Beller wrote: >>> +/* >>> + * Migrate the given submodule (and all its submodules recursively) from >>> + * having

Re: [PATCHv2 4/4] submodule: add embed-git-dir function

2016-11-30 Thread Stefan Beller
On Wed, Nov 30, 2016 at 3:14 AM, Duy Nguyen wrote: > On Wed, Nov 23, 2016 at 2:22 AM, Stefan Beller wrote: >> +/* >> + * Migrate the given submodule (and all its submodules recursively) from >> + * having its git directory within the working tree to the git

Re: [PATCHv2 4/4] submodule: add embed-git-dir function

2016-11-30 Thread Duy Nguyen
On Wed, Nov 23, 2016 at 2:22 AM, Stefan Beller wrote: > +/* > + * Migrate the given submodule (and all its submodules recursively) from > + * having its git directory within the working tree to the git dir nested > + * in its superprojects git dir under modules/. > + */ >

[PATCHv2 4/4] submodule: add embed-git-dir function

2016-11-22 Thread Stefan Beller
When a submodule has its git dir inside the working dir, the submodule support for checkout that we plan to add in a later patch will fail. Add functionality to migrate the git directory to be embedded into the superprojects git directory. Signed-off-by: Stefan Beller ---