Re: BUG in fetching non-checked out submodule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ralf,

> Le 2 déc. 2020 à 10:56, Ralf Thielow <ralf.thielow@xxxxxxxxx> a écrit :
> 
> Hi,
> 
> I have the current 'master' branch of git installed and get
> the following error when fetching a submodule that is not
> checked out.
> 
> I've bisected this error down to commit
> 1b7ac4e6d4 (submodules: fix of regression on fetching of
> non-init subsub-repo, 2020-11-12)

Thanks for bisecting it. That commit wanted to fix a different bug
related to nested submodules, and the route taken was simply
reverting an earlier commit (a62387b (submodule.c: fetch in
submodules git directory instead of in worktree, 2018-11-28).

As you discovered, it breaks other scenarios.

> 
> $ git version
> git version 2.29.2.435.g72ffeb997e
> 
> $ git config --get submodule.recurse
> true

Yeah, I think the test suite could make more efforts
to run more tests with that setting turned 'on', but
it would require significants efforts since it changes 
the behaviour of several commands.

Meta question: is there an easy way to run the whole test
suite with specific config options turned on ?

> 
> $ git submodule status
> -855827c583bc30645ba427885caa40c5b81764d2 sha1collisiondetection
> 
> $ git fetch
> Fetching submodule sha1collisiondetection
> Fetching submodule sha1collisiondetection/sha1collisiondetection
> Fetching submodule
> sha1collisiondetection/sha1collisiondetection/sha1collisiondetection
> Fetching submodule
> sha1collisiondetection/sha1collisiondetection/sha1collisiondetection/sha1collisiondetection
> ...
> 
> $ git submodule update --checkout
> Submodule path 'sha1collisiondetection': checked out
> '855827c583bc30645ba427885caa40c5b81764d2'

Ok, you don't add '--init' but the submodule gets checked out,
so it looks like you have 'submodule.active' set to a pathspec 
that matches 'sha1collisiondetection'. Did you clone the git repo
with '--recurse-submodules', which would add '.' as the value of
'submodule.active' ? Or maybe you manually configured that value
in your global gitconfig ?

Thanks for the report,

Philippe.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux