# Submodule status inside nested submodule fails

5 messages from 2012-02-24 to 2012-05-10. Participants: Charles Brossollet, rollinsdr@gmail.com, Heiko Voigt.
Thread: https://gitlist.dev/t/29721

## Charles Brossollet, 2012-02-24 09:53

Subject: Submodule status inside nested submodule fails
Message-ID: <loom.20120224T104003-230@post.gmane.org>
URL: https://gitlist.dev/e/loom.20120224T104003-230%40post.gmane.org

```
Hello there,

Using MSysGit 1.7.9 on Win7 (64 bit), I have a repo with the following 
structure:

main/
  src/
  ext/
    submodule/
       modules/module1
       modules/module2

submodule is... a submodule, having itself submodules.

When I query submodule status --recursive in main/, no problem.
But when I query submodule status in  ext/submodule, I get error "You need to
run this command from the toplevel of the working tree.", which is a wrong
error message.

Searching for message in git source I found the test triggering the message to
be an empty result for "git rev-parse --show-cdup". Running the command in
ext/submodule strangely returns the *absolute* path of ext/submodule, which
should not happen because this command returns path of current dir relative to
the containing working tree.

Is there something wrong with my repo? Or have I found a bug? Any help
appreciated

Charles

```

## Charles Brossollet, 2012-02-24 13:41

Subject: Re: Submodule status inside nested submodule fails
Message-ID: <loom.20120224T142455-253@post.gmane.org>
URL: https://gitlist.dev/e/loom.20120224T142455-253%40post.gmane.org
In-Reply-To: <loom.20120224T104003-230@post.gmane.org>

```
Charles Brossollet <chbrosso <at> lltech.fr> writes:
 
> Searching for message in git source I found the test triggering the message to
> be an empty result for "git rev-parse --show-cdup". Running the command in
> ext/submodule strangely returns the *absolute* path of ext/submodule, which
> should not happen because this command returns path of current dir relative to
> the containing working tree.

Things are OK if I run the commands from Windows' CMD, but it fails when run in
MinGW shell, so I believe the problem is related to MsysGit, discussion follows
up on their list.

```

## rollinsdr@gmail.com, 2012-05-08 18:11

Subject: Re: Submodule status inside nested submodule fails
Message-ID: <1336500675427-7540130.post@n2.nabble.com>
URL: https://gitlist.dev/e/1336500675427-7540130.post%40n2.nabble.com
In-Reply-To: <loom.20120224T142455-253@post.gmane.org>

```
I'm having the same issue. Did it ever get resolved, or is there a hack to
fix it, or is there some link I can track it on?

Thanks in advance for the help!



Charles Brossollet wrote
> 
> Charles Brossollet <chbrosso <at> lltech.fr> writes:
> Using MSysGit 1.7.9 on Win7 (64 bit), I have a repo with the following 
> structure: 
> 
> main/ 
>   src/ 
>   ext/ 
>     submodule/ 
>        modules/module1 
>        modules/module2 
> 
> submodule is... a submodule, having itself submodules. 
> 
> When I query submodule status --recursive in main/, no problem. 
> But when I query submodule status in  ext/submodule, I get error "You need
> to 
> run this command from the toplevel of the working tree.", which is a wrong 
> error message. 
> 
> Searching for message in git source I found the test triggering the
> message to 
> be an empty result for "git rev-parse --show-cdup". Running the command in 
> ext/submodule strangely returns the *absolute* path of ext/submodule,
> which 
> should not happen because this command returns path of current dir
> relative to 
> the containing working tree. 
> 
> Is there something wrong with my repo? Or have I found a bug? Any help 
> appreciated 
> 


Charles Brossollet wrote
> 
> Charles Brossollet <chbrosso <at> lltech.fr> writes:
>  
>> Searching for message in git source I found the test triggering the
>> message to
>> be an empty result for "git rev-parse --show-cdup". Running the command
>> in
>> ext/submodule strangely returns the *absolute* path of ext/submodule,
>> which
>> should not happen because this command returns path of current dir
>> relative to
>> the containing working tree.
> 
> Things are OK if I run the commands from Windows' CMD, but it fails when
> run in
> MinGW shell, so I believe the problem is related to MsysGit, discussion
> follows
> up on their list.
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@.kernel
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
View this message in context: http://git.661346.n2.nabble.com/Submodule-status-inside-nested-submodule-fails-tp7314413p7540130.html
Sent from the git mailing list archive at Nabble.com.

```

## Heiko Voigt, 2012-05-09 21:34

Subject: Re: Submodule status inside nested submodule fails
Message-ID: <20120509213443.GA74366@book.hvoigt.net>
URL: https://gitlist.dev/e/20120509213443.GA74366%40book.hvoigt.net
In-Reply-To: <1336500675427-7540130.post@n2.nabble.com>

```
Hi,

On Tue, May 08, 2012 at 11:11:15AM -0700, rollinsdr@gmail.com wrote:
> I'm having the same issue. Did it ever get resolved, or is there a hack to
> fix it, or is there some link I can track it on?
> 
> 
> Charles Brossollet wrote
> > 
> > Charles Brossollet <chbrosso <at> lltech.fr> writes:
> > Using MSysGit 1.7.9 on Win7 (64 bit), I have a repo with the following 
> > structure: 
> > 
> > main/ 
> >   src/ 
> >   ext/ 
> >     submodule/ 
> >        modules/module1 
> >        modules/module2 
> > 
> > submodule is... a submodule, having itself submodules. 
> > 
> > When I query submodule status --recursive in main/, no problem. 
> > But when I query submodule status in  ext/submodule, I get error "You need

Without having looked at the code itself this smells like an issue with
the newly introduced gitlink files and git rev-parse --show-cdup not
taking this into account.

I will have a look at this issue.

Cheers Heiko

```

## rollinsdr@gmail.com, 2012-05-10 01:40

Subject: Re: Submodule status inside nested submodule fails
Message-ID: <1336614004527-7545109.post@n2.nabble.com>
URL: https://gitlist.dev/e/1336614004527-7545109.post%40n2.nabble.com
In-Reply-To: <20120509213443.GA74366@book.hvoigt.net>

```
Thanks Heiko,


Heiko Voigt-3 wrote
> 
> Hi,
> 
> On Tue, May 08, 2012 at 11:11:15AM -0700, rollinsdr@ wrote:
>> I'm having the same issue. Did it ever get resolved, or is there a hack
>> to
>> fix it, or is there some link I can track it on?
>> 
>> 
>> Charles Brossollet wrote
>> > 
>> > Charles Brossollet <chbrosso <at> lltech.fr> writes:
>> > Using MSysGit 1.7.9 on Win7 (64 bit), I have a repo with the following 
>> > structure: 
>> > 
>> > main/ 
>> >   src/ 
>> >   ext/ 
>> >     submodule/ 
>> >        modules/module1 
>> >        modules/module2 
>> > 
>> > submodule is... a submodule, having itself submodules. 
>> > 
>> > When I query submodule status --recursive in main/, no problem. 
>> > But when I query submodule status in  ext/submodule, I get error "You
>> need
> 
> Without having looked at the code itself this smells like an issue with
> the newly introduced gitlink files and git rev-parse --show-cdup not
> taking this into account.
> 
> I will have a look at this issue.
> 
> Cheers Heiko
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@.kernel
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Actually the issue went away once I upgraded from 1.7.9 to 1.7.10, and
re-cloned my repo. I guess it was fixed in 1.7.10, but some stuff in the
config files had to be rewritten during the new clone to fix the issue b/c
just switching to 1.7.10 and trying to use the existing repo still had the
same issue.

Thanks for all the work you guys do!
DAVE

--
View this message in context: http://git.661346.n2.nabble.com/Submodule-status-inside-nested-submodule-fails-tp7314413p7545109.html
Sent from the git mailing list archive at Nabble.com.

```
