{"thread":{"id":"37488","subject":"Git submodule add with branch and depth option","startedAt":"2014-09-04T15:21:29Z","lastAt":"2014-09-04T15:21:29Z","messageCount":1,"participants":["Cole"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"248840","messageId":"CACsf_wy51oUaFOKHbg9QUQibkM045FYXY9HpYM84H5tvJcbPYg@mail.gmail.com","threadId":"37488","inReplyTo":null,"subject":"Git submodule add with branch and depth option","fromName":"Cole","fromEmail":"cole@opteqint.net","sentAt":"2014-09-04T15:21:29Z","receivedAt":"2014-09-04T15:21:29Z","isPatch":false,"sender":{"key":"cole@opteqint.net","avatar":null},"body":"Hi,\n\nI am trying to add a submodule using the following command:\n\n$ git submodule add -b gcc-4_9-branch --depth 1\nhttps://github.com/gcc-mirror/gcc.git src\n\nAs you can see, I am trying to clone a single commit from the\n'gcc-4_9-branch' branch, and avoid downloading the entire history of\nthat branch.\n\nHowever, after downloading all the necessary files, it then errors out\nwith the following output:\n\ncolem@xvm14:~/repos/gcc-4.9 [0]\n$ git submodule add -b gcc-4_9-branch --depth 1\nhttps://github.com/gcc-mirror/gcc.git src\nCloning into 'src'...\nremote: Counting objects: 90203, done.\nremote: Compressing objects: 100% (71667/71667), done.\nremote: Total 90203 (delta 27425), reused 62802 (delta 17053)\nReceiving objects: 100% (90203/90203), 111.82 MiB | 467.00 KiB/s, done.\nResolving deltas: 100% (27425/27425), done.\nChecking connectivity... done.\nfatal: Cannot update paths and switch to branch 'gcc-4_9-branch' at\nthe same time.\nDid you intend to checkout 'origin/gcc-4_9-branch' which can not be\nresolved as commit?\nUnable to checkout submodule 'src'\ncolem@xvm14:~/repos/gcc-4.9 [0]\n$ git --version\ngit version 2.1.0\ncolem@xvm14:~/repos/gcc-4.9 [0]\n\n\nDoes anyone have any suggestions to try resolve the problem?\nAny help would be appreciated.\n\nRegards\n/Cole\n"}]}