Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [BUG] `git submodule update --init --recursive` stores gitdir in full path into `.git` of nested submodules

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:09:08

Stefan Beller [off-list ref] writes:
On Wed, Mar 30, 2016 at 9:05 AM, Stefan Beller [off-list ref] wrote:
quoted
On Wed, Mar 30, 2016 at 2:03 AM, Norio Nomura [off-list ref] wrote:
quoted
Hi,

`git submodule update --init --recursive` stores `gitdir` in full path into `.git` of nested submodules.
So, working directory is not portable to another directory.
Are you reporting a regression bug? (Is that a new thing or has it
always been that way and you just discover that it is unfortunate?)
Which versions did you test with?
➜  15:34:32 git:(master) git --version
git version 2.8.0

at the end of your gist.
The same happens when using 2.7.4, it doesn't happen when using 2.6.6 though.

It turns out ee8838d (2015-09-08, submodule: rewrite `module_clone`
shell function in C)
broke it.

I'll look into fixing it.
Thanks.

This may be an unrelated tangent, but somewhere in "submodule init"
codepath seem to turn paths into absolute too aggressively.  Merging
your recent "path related fix" to 'pu' seems to break some test by
showing absolute paths when the test expects to see relative ones.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help