{"thread":{"id":"40370","subject":"Shallow submodules update not working?","startedAt":"2015-09-17T11:28:14Z","lastAt":"2015-09-17T11:28:14Z","messageCount":1,"participants":["Gautier Pelloux-Prayer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"270203","messageId":"68A9767C-BC5B-479D-B212-BEB1CDF3E7E8@gmail.com","threadId":"40370","inReplyTo":null,"subject":"Shallow submodules update not working?","fromName":"Gautier Pelloux-Prayer","fromEmail":"gautier.pelloux@gmail.com","sentAt":"2015-09-17T11:28:14Z","receivedAt":"2015-09-17T11:28:14Z","isPatch":false,"sender":{"key":"gautier.pelloux@gmail.com","avatar":null},"body":"Using git version 2.3.8 (Apple Git-58), when I try to clone a repository with submodules using option --depth 1, I get two different behaviors for two different commands:\n\n# 1 - using git clone --recursive directly (OK)\n# repository last ref is cloned as well as its submodules\n$ git submodule clone git://repository --depth 1 --recursive \n\n# 2 - using git clone then git submodule update (KO)\n# repository is cloned, then submodules are cloned too but an invalid reference is fetched leading to \"fatal: reference is not a tree: <submodule ref>\"\n$ git submodule clone git://repository --depth 1\n$ cd repository\n$ git submodule update --init --recursive --depth 1 #error \n\nI am wondering if the second scenario has the intended behavior, or if it should behave as the first solution. \n\nIf this is the intented behavior, is it possible to retrieve a shallow version of submodules within an existing git repository, or the only solution is to clone the whole project with --depth 1 option?\n\nThanks, "}]}