Re: [PATCHv5 5/5] submodule: add embed-git-dir function

2016-12-08 Thread Duy Nguyen
On Thu, Dec 8, 2016 at 4:01 AM, Stefan Beller wrote: > +/* > + * Migrate the git directory of the given `path` from `old_git_dir` to > + * `new_git_dir`. If an error occurs, append it to `err` and return the > + * error code. > + */ > +int relocate_gitdir(const char *path, const char *old_git_dir,

Re: [PATCHv5 5/5] submodule: add embed-git-dir function

2016-12-07 Thread Brandon Williams
On 12/07, Stefan Beller wrote: > + argv_array_pushl(&cp.args, "--super-prefix", sb.buf, > + "submodule--helper", > +"embed-git-dirs", NULL); check the spacing on these lines, looks like there is an extra sp

Re: [PATCHv5 5/5] submodule: add embed-git-dir function

2016-12-07 Thread Stefan Beller
On Wed, Dec 7, 2016 at 3:03 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> @@ -1093,7 +1129,8 @@ static struct cmd_struct commands[] = { >> {"resolve-relative-url", resolve_relative_url, 0}, >> {"resolve-relative-url-test", resolve_relative_url_test, 0}, >> {"init", modu

Re: [PATCHv5 5/5] submodule: add embed-git-dir function

2016-12-07 Thread Junio C Hamano
Stefan Beller writes: > @@ -1093,7 +1129,8 @@ static struct cmd_struct commands[] = { > {"resolve-relative-url", resolve_relative_url, 0}, > {"resolve-relative-url-test", resolve_relative_url_test, 0}, > {"init", module_init, 0}, > - {"remote-branch", resolve_remote_submodul

[PATCHv5 5/5] submodule: add embed-git-dir function

2016-12-07 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. The newly added code in this patch is structured such tha