threads / bug / 41942

bug: nested submodules get an absolute gitdir path

Subject: bug: nested submodules get an absolute gitdir path

## tl;dr

3 messages between Apr 6, 2016 and Apr 7, 2016.

replies: 2people: 2as markdown or json

Antti Halttunen· Apr 6, 2016, 07:02 UTC · lore
Hi all,
Starting with git v2.7.0,
submodules two levels deep get a .git contents of:
 gitdir: /absolute/path/name
This breaks repos that are moved or copied:

fatal: Not a git repository: /tmp/tmp.gIyxKWIC26/repo/.git/modules/sub/modules/sub fatal: 'git status --porcelain' failed in submodule sub

The script https://gitlab.com/snippets/17301 reproduces the issue.
git bisect points to commit ee8838d1.
thanks,
-- 
antti
Junio C Hamano· Apr 6, 2016, 15:02 UTC · re: Antti Halttunen · lore

Re: bug: nested submodules get an absolute gitdir path

Antti Halttunen <Antti.Halttunen@iki.fi> writes:
> Starting with git v2.7.0,
>
> submodules two levels deep get a .git contents of:
>  gitdir: /absolute/path/name
I think that this is $gmane/290491
http://thread.gmane.org/gmane.comp.version-control.git/290491

and queued as sb/submodule-helper-clone-regression-fix topic, currently included on the 'pu' branch. Can you try it and see if it fixes your issue?

Thanks.
Show 12 quoted lines
>
> This breaks repos that are moved or copied:
>
> fatal: Not a git repository:
> /tmp/tmp.gIyxKWIC26/repo/.git/modules/sub/modules/sub
> fatal: 'git status --porcelain' failed in submodule sub
>
> The script https://gitlab.com/snippets/17301 reproduces the issue.
>
> git bisect points to commit ee8838d1.
>
> thanks,
Antti Halttunen· Apr 7, 2016, 06:44 UTC · re: Junio C Hamano · lore

Re: bug: nested submodules get an absolute gitdir path

On Wed, Apr 6, 2016 at 6:02 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> Antti Halttunen <Antti.Halttunen@iki.fi> writes:
>
>> Starting with git v2.7.0,
>>
>> submodules two levels deep get a .git contents of:
>>  gitdir: /absolute/path/name
>
> I think that this is $gmane/290491
>
> http://thread.gmane.org/gmane.comp.version-control.git/290491
>
> and queued as sb/submodule-helper-clone-regression-fix topic,
> currently included on the 'pu' branch.  Can you try it and see if it
> fixes your issue?
it does, thanks.
Show 14 quoted lines
> Thanks.
>
>>
>> This breaks repos that are moved or copied:
>>
>> fatal: Not a git repository:
>> /tmp/tmp.gIyxKWIC26/repo/.git/modules/sub/modules/sub
>> fatal: 'git status --porcelain' failed in submodule sub
>>
>> The script https://gitlab.com/snippets/17301 reproduces the issue.
>>
>> git bisect points to commit ee8838d1.
>>
>> thanks,
-- 
antti

← back to recent threads