git submodule update needs to be at the toplevel of working tree, why?

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

 



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@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]