git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Cunz <sascha-ml@babbelbox.org>
To: git@vger.kernel.org
Subject: git pull with submodule
Date: Sat, 23 Jun 2012 15:53:26 +0200	[thread overview]
Message-ID: <1564611.U3XyAbWYKV@toshi> (raw)

I noticed the following behaviour when pulling a repository that has a 
submodule.

I have a standalone checkout of my subproject, which I regulary sync it with 
its upstream and push the result to github. Then I go to my project where the 
github repository is setup to be a subproject, 'cd' into the subproject and do 
'git pull' there. After that, I commit the subproject blob into the 
superproject.

Now i switch OS and/or workstation and do a 'git pull' ( in root directory of 
superproject ). Git then
	-> fetches new objects of superproject
	-> fetches new objects of subproject
	-> checks out the subproject to the SHA1 currently recorded in
      the subproject blob. (Am i right on this one?)
	-> merges superproject with it's upstream

After that, i have to cd into the subproject and 'git pull' there again, 
because it just fetched the objects but did no merge nor checkout.

Is this intentional behaviour or am i doing something wrong / have wrong 
expectations in that "after seeing it recurring into the subproject, i expect 
i don't need to do further steps in order to have it up to date"?

SaCu

PS I'm using a mix of git Versions 1.7.{6,8,10}

             reply	other threads:[~2012-06-24 13:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-23 13:53 Sascha Cunz [this message]
2012-06-24 18:24 ` git pull with submodule Jens Lehmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1564611.U3XyAbWYKV@toshi \
    --to=sascha-ml@babbelbox.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).