{"thread":{"id":"35392","subject":"git submodule update needs to be at the toplevel of working tree, why?","startedAt":"2013-11-22T13:22:30Z","lastAt":"2013-11-22T14:37:00Z","messageCount":3,"participants":["Odin Hørthe Omdal","John Keeping"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"230944","messageId":"1385126550.10973.50760825.6B70B959@webmail.messagingengine.com","threadId":"35392","inReplyTo":null,"subject":"git submodule update needs to be at the toplevel of working tree, why?","fromName":"Odin Hørthe Omdal","fromEmail":"odinho@opera.com","sentAt":"2013-11-22T13:22:30Z","receivedAt":"2013-11-22T13:22:30Z","isPatch":false,"sender":{"key":"odinho@opera.com","avatar":null},"body":"Hi,\n\nI'm usually in a subfolder doing actual work. A very common problem I\nhave is wanting to do a submodule update, but git really hates that. And\nI wonder why?\n\nIt wouldn't be hard to cd to the toplevel working directory, do the\nupdate, and cd back. It's what I have to do manually every time now\nalready:\n\n\n  $ git submodule update\n  You need to run this command from the toplevel of the working tree.\n\n  $ cd ../..\n\n  $ git submodule update\n  Submodule path 'myproject/libs/external-module': checked out\n  '434fdf32a7add62...\n\n  $ cd -\n\n\nI see that it comes from git-sh-setup, so no rationale for this rather\nweird and surprising behavior is given in the git-submodule file. :)\n\n-- \n  Odin Hørthe Omdal\n  odinho@opera.com\n"},{"id":"230945","messageId":"20131122134747.GC15033@serenity.lan","threadId":"35392","inReplyTo":"1385126550.10973.50760825.6B70B959@webmail.messagingengine.com","subject":"Re: git submodule update needs to be at the toplevel of working tree, why?","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2013-11-22T13:47:47Z","receivedAt":"2013-11-22T13:47:47Z","isPatch":false,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"On Fri, Nov 22, 2013 at 02:22:30PM +0100, Odin Hørthe Omdal wrote:\n> I'm usually in a subfolder doing actual work. A very common problem I\n> have is wanting to do a submodule update, but git really hates that. And\n> I wonder why?\n> \n> It wouldn't be hard to cd to the toplevel working directory, do the\n> update, and cd back. It's what I have to do manually every time now\n> already:\n\nThis restriction was removed in Git 1.8.4.\n"},{"id":"230947","messageId":"1385131020.5838.50791533.395F2F63@webmail.messagingengine.com","threadId":"35392","inReplyTo":"20131122134747.GC15033@serenity.lan","subject":"Re: git submodule update needs to be at the toplevel of working tree, why?","fromName":"Odin Hørthe Omdal","fromEmail":"odinho@opera.com","sentAt":"2013-11-22T14:37:00Z","receivedAt":"2013-11-22T14:37:00Z","isPatch":false,"sender":{"key":"odinho@opera.com","avatar":null},"body":"On Fri, Nov 22, 2013, at 14:47, John Keeping wrote:\n> On Fri, Nov 22, 2013 at 02:22:30PM +0100, Odin Hørthe Omdal wrote:\n> > I'm usually in a subfolder doing actual work. A very common problem I\n> > have is wanting to do a submodule update, but git really hates that. And\n> > I wonder why?\n> > \n> > It wouldn't be hard to cd to the toplevel working directory, do the\n> > update, and cd back. It's what I have to do manually every time now\n> > already:\n> \n> This restriction was removed in Git 1.8.4.\n\nOh, awesome!  My system git is 1.8.3.2.\n\nI'll do a manual install then :)\n\nSorry for the noise. (I didn't find any earlier talk about it, but I\nonly used gmame's search, so it might have missed something)\n\n-- \n  Odin Hørthe Omdal\n  odinho@opera.com\n"}]}