git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git submodule update needs to be at the toplevel of working tree, why?
@ 2013-11-22 13:22 Odin Hørthe Omdal
  2013-11-22 13:47 ` John Keeping
  0 siblings, 1 reply; 3+ messages in thread
From: Odin Hørthe Omdal @ 2013-11-22 13:22 UTC (permalink / raw)
  To: git

Hi,

I'm usually in a subfolder doing actual work. A very common problem I
have is wanting to do a submodule update, but git really hates that. And
I wonder why?

It wouldn't be hard to cd to the toplevel working directory, do the
update, and cd back. It's what I have to do manually every time now
already:


  $ git submodule update
  You need to run this command from the toplevel of the working tree.

  $ cd ../..

  $ git submodule update
  Submodule path 'myproject/libs/external-module': checked out
  '434fdf32a7add62...

  $ cd -


I see that it comes from git-sh-setup, so no rationale for this rather
weird and surprising behavior is given in the git-submodule file. :)

-- 
  Odin Hørthe Omdal
  odinho@opera.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-22 14:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-22 13:22 git submodule update needs to be at the toplevel of working tree, why? Odin Hørthe Omdal
2013-11-22 13:47 ` John Keeping
2013-11-22 14:37   ` Odin Hørthe Omdal

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).