threads / discuss / 23082

submodule problem

Subject: submodule problem

## tl;dr

4 messages between Mar 19, 2010 and Mar 19, 2010.

replies: 3people: 3as markdown or json

John Dlugosz· Mar 19, 2010, 16:54 UTC · lore
I thought I knew what I was doing, after reading the instructions.
When I checked out an older version of the main project, I have to sync to the proper (older) version of the submodule too.  git admonished me to run the command from the toplevel of the working tree, and when that was done,
        git submodule update
gives no output.
        git submodule status
shows "-8441e..." which is the SHA1 of the version I expect I need.  But git status shows me that the submodule is modified.  git gui shows
        @ -1 +1 @@
        -Subproject commit 8441ea2e54fa2e8a4f45240a0d399f1c775a1789
        +Subproject commit bc47be2d623cbca83701d9f30a18fab6271dd38f
and gitk, run from the subproject's subdirectory, shows that bc47b, the newer stuff, is still active.  Browsing the files, I see this is indeed the case.
Now, my impression was that 'git submodule update' was supposed to check out the proper version, namely 4441e, not merely do nothing without even an error.  What am I missing?
--John
git version 1.6.5.1.1367.gcd48
msysgit on Windows XP 64-bit
=======================Sorry for the long footer; it's not my idea.
TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.
  If you received this in error, please contact the sender and delete the material from any computer.
Avery Pennarun· Mar 19, 2010, 17:27 UTC · re: John Dlugosz · lore

Re: submodule problem

On Fri, Mar 19, 2010 at 12:54 PM, John Dlugosz <JDlugosz@tradestation.com> wrote:

Show 11 quoted lines
> I thought I knew what I was doing, after reading the instructions.
>
> When I checked out an older version of the main project, I have to sync to the proper
> (older) version of the submodule too.  git admonished me to run the command from
> the toplevel of the working tree, and when that was done,
>
>        git submodule update
>
> gives no output.
>
>        git submodule status
Did you run 'git submodule init'?  You generally have to do this once per repo.
Avery
Lars Hjemli· Mar 19, 2010, 17:29 UTC · re: John Dlugosz · lore

Re: submodule problem

On Fri, Mar 19, 2010 at 17:54, John Dlugosz <JDlugosz@tradestation.com> wrote:
Show 7 quoted lines
>        git submodule update
>
> gives no output.
>
>        git submodule status
>
> shows "-8441e..." which is the SHA1 of the version I expect I need.

The '-' prefix indicates that the submodule isn't registered in your .git/config. You should have a 'submodule.$name.url' entry in the config (where $name is the name of the submodule as found in .gitmodule').

-- larsh

John Dlugosz· Mar 19, 2010, 19:22 UTC · re: Lars Hjemli · lore

RE: submodule problem

Show 5 quoted lines
> The '-' prefix indicates that the submodule isn't registered in your
> .git/config. You should have a 'submodule.$name.url' entry in the
> config (where $name is the name of the submodule as found in
> .gitmodule').
> 
Thanks.  The slashes were going the wrong way, e.g.
	[submodule "Source\\Shared\\Aardvark"]
		url = //tx01fs01/SYS/dev/git/repositories/Aardvark.git
It did not work at all when I first created it with "submodule add", and manually fixed the .modules file.  I need to do the same with the entry in .git/config.
I did give the Unix-style slashes when I called submodule add.  It must have code somewhere that gets a listing or something from an OS primitive and didn't reverse it.  A bug in msys, or some code that bypasses the abstraction layer, or something in a Perl program, perhaps.
--John
TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

← back to recent threads