{"thread":{"id":"43851","subject":"Git shallow clone branch doesn't work with recursive submodules cloning","startedAt":"2016-08-15T11:20:33Z","lastAt":"2016-08-15T13:06:38Z","messageCount":6,"participants":["Arkady Shapkin","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"299324","messageId":"CAB-zwL28qUBO5PrRznH9KmLJZUHO65_J-DxvPP+NHZEuofKh9Q@mail.gmail.com","threadId":"43851","inReplyTo":null,"subject":"Git shallow clone branch doesn't work with recursive submodules cloning","fromName":"Arkady Shapkin","fromEmail":"arkady.shapkin@gmail.com","sentAt":"2016-08-15T11:20:27Z","receivedAt":"2016-08-15T11:20:33Z","isPatch":false,"sender":{"key":"arkady.shapkin@gmail.com","avatar":"https://gravatar.com/avatar/43109f18574975497e5ccac394f04f6f3c187f302ec8d2bd4de734ad5bb2001a?d=mp&s=160"},"body":"Hi,\n\nI am trying clone repository by tag with recursive submodules init,\nbut for one submodule it doesn't work.\nWhat I'm doing wrong?\n\n>git clone https://github.com/grpc/grpc.git --recursive --depth 1 dsad5\n\nCloning into 'dsad5'...\nremote: Counting objects: 7475, done.\nremote: Compressing objects: 100% (4695/4695), done.\nremote: Total 7475 (delta 2593), reused 5610 (delta 1265), pack-reused 0\nReceiving objects: 100% (7475/7475), 4.85 MiB | 2.55 MiB/s, done.\nResolving deltas: 100% (2593/2593), done.\nChecking connectivity... done.\nChecking out files: 100% (6820/6820), done.\nSubmodule 'third_party/boringssl'\n(https://github.com/google/boringssl.git) registered for path\n'third_party/boringssl'\nSubmodule 'third_party/gflags' (https://github.com/gflags/gflags.git)\nregistered for path 'third_party/gflags'\nSubmodule 'third_party/googletest'\n(https://github.com/google/googletest.git) registered for path\n'third_party/googletest'\nSubmodule 'third_party/nanopb' (https://github.com/nanopb/nanopb.git)\nregistered for path 'third_party/nanopb'\nSubmodule 'third_party/protobuf'\n(https://github.com/google/protobuf.git) registered for path\n'third_party/protobuf'\nSubmodule 'third_party/zlib' (https://github.com/madler/zlib)\nregistered for path 'third_party/zlib'\nCloning into 'D:/Work/conan-packages/dsad5/third_party/boringssl'...\nCloning into 'D:/Work/conan-packages/dsad5/third_party/gflags'...\nCloning into 'D:/Work/conan-packages/dsad5/third_party/googletest'...\nCloning into 'D:/Work/conan-packages/dsad5/third_party/nanopb'...\nCloning into 'D:/Work/conan-packages/dsad5/third_party/protobuf'...\nCloning into 'D:/Work/conan-packages/dsad5/third_party/zlib'...\nerror: no such remote ref c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9\nFetched in submodule path 'third_party/boringssl', but it did not\ncontain c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9. Direct fetching of\nthat commit failed.\n\n>git --version\ngit version 2.9.0.windows.1\n\n-- \nWBR,\nArkady Shapkin\n"},{"id":"299327","messageId":"20160815120441.nwtdqfgcv3ljt4vl@sigill.intra.peff.net","threadId":"43851","inReplyTo":"CAB-zwL28qUBO5PrRznH9KmLJZUHO65_J-DxvPP+NHZEuofKh9Q@mail.gmail.com","subject":"Re: Git shallow clone branch doesn't work with recursive submodules cloning","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-08-15T12:04:41Z","receivedAt":"2016-08-15T12:04:48Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Aug 15, 2016 at 02:20:27PM +0300, Arkady Shapkin wrote:\n\n> I am trying clone repository by tag with recursive submodules init,\n> but for one submodule it doesn't work.\n> What I'm doing wrong?\n\nNothing. See 18a74a0 (clone: do not let --depth imply\n--shallow-submodules, 2016-06-19).\n\n> >git --version\n> git version 2.9.0.windows.1\n\nThe fix is in v2.9.1.\n\n-Peff\n"},{"id":"299335","messageId":"CAB-zwL2oFMBFjkkoh1EhSD7FCK_1wVV+whu8uxTKTHQKJgNzrQ@mail.gmail.com","threadId":"43851","inReplyTo":"20160815120441.nwtdqfgcv3ljt4vl@sigill.intra.peff.net","subject":"Re: Git shallow clone branch doesn't work with recursive submodules cloning","fromName":"Arkady Shapkin","fromEmail":"arkady.shapkin@gmail.com","sentAt":"2016-08-15T12:29:14Z","receivedAt":"2016-08-15T12:37:28Z","isPatch":false,"sender":{"key":"arkady.shapkin@gmail.com","avatar":"https://gravatar.com/avatar/43109f18574975497e5ccac394f04f6f3c187f302ec8d2bd4de734ad5bb2001a?d=mp&s=160"},"body":"Thank you, after updating to \"2.9.3.windows.1\" options \"--recursive\n--depth 1\" now works.\n\nBut \"--recursive --shallow-submodules\" and \"--recursive\n--shallow-submodules --depth 1\" still doesn't work.\n\n2016-08-15 15:04 GMT+03:00 Jeff King <peff@peff.net>:\n> On Mon, Aug 15, 2016 at 02:20:27PM +0300, Arkady Shapkin wrote:\n>\n>> I am trying clone repository by tag with recursive submodules init,\n>> but for one submodule it doesn't work.\n>> What I'm doing wrong?\n>\n> Nothing. See 18a74a0 (clone: do not let --depth imply\n> --shallow-submodules, 2016-06-19).\n>\n>> >git --version\n>> git version 2.9.0.windows.1\n>\n> The fix is in v2.9.1.\n>\n> -Peff\n\n\n\n-- \nWBR,\nArkady Shapkin aka Dragon\n"},{"id":"299338","messageId":"20160815124725.t6bo5fv4lbbnqnfo@sigill.intra.peff.net","threadId":"43851","inReplyTo":"CAB-zwL2oFMBFjkkoh1EhSD7FCK_1wVV+whu8uxTKTHQKJgNzrQ@mail.gmail.com","subject":"Re: Git shallow clone branch doesn't work with recursive submodules cloning","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-08-15T12:47:26Z","receivedAt":"2016-08-15T12:47:33Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Aug 15, 2016 at 03:29:14PM +0300, Arkady Shapkin wrote:\n\n> Thank you, after updating to \"2.9.3.windows.1\" options \"--recursive\n> --depth 1\" now works.\n> \n> But \"--recursive --shallow-submodules\" and \"--recursive\n> --shallow-submodules --depth 1\" still doesn't work.\n\nIt does \"work\", but the server hosting your submodule may not be\nconfigured to allow you to access the reachable-but-non-tip sha1\ndirectly. So it's not a bug, but rather a configuration issue (and the\n\"fix\" in v2.9.1 is to be less aggressive about enabling\nshallow-submodules, since the default server configuration does not\nallow it to work well).\n\nMore discussion is in:\n\n  http://public-inbox.org/git/OFE09D48F2.D1D14F49-ONC2257FD7.00280736-C2257FD7.0028245A@notes.na.collabserv.com/t/#u\n\n-Peff\n"},{"id":"299340","messageId":"CAB-zwL2P08YC=3Ube8mkZ=mB4xpW6TUnG2gEZKtvRU03eE6ALA@mail.gmail.com","threadId":"43851","inReplyTo":"20160815124725.t6bo5fv4lbbnqnfo@sigill.intra.peff.net","subject":"Re: Git shallow clone branch doesn't work with recursive submodules cloning","fromName":"Arkady Shapkin","fromEmail":"arkady.shapkin@gmail.com","sentAt":"2016-08-15T12:53:48Z","receivedAt":"2016-08-15T12:53:54Z","isPatch":false,"sender":{"key":"arkady.shapkin@gmail.com","avatar":"https://gravatar.com/avatar/43109f18574975497e5ccac394f04f6f3c187f302ec8d2bd4de734ad5bb2001a?d=mp&s=160"},"body":"So it will work only if github update their server configuration\n(boringssl submodule on github)?\n\n2016-08-15 15:47 GMT+03:00 Jeff King <peff@peff.net>:\n> On Mon, Aug 15, 2016 at 03:29:14PM +0300, Arkady Shapkin wrote:\n>\n>> Thank you, after updating to \"2.9.3.windows.1\" options \"--recursive\n>> --depth 1\" now works.\n>>\n>> But \"--recursive --shallow-submodules\" and \"--recursive\n>> --shallow-submodules --depth 1\" still doesn't work.\n>\n> It does \"work\", but the server hosting your submodule may not be\n> configured to allow you to access the reachable-but-non-tip sha1\n> directly. So it's not a bug, but rather a configuration issue (and the\n> \"fix\" in v2.9.1 is to be less aggressive about enabling\n> shallow-submodules, since the default server configuration does not\n> allow it to work well).\n>\n> More discussion is in:\n>\n>   http://public-inbox.org/git/OFE09D48F2.D1D14F49-ONC2257FD7.00280736-C2257FD7.0028245A@notes.na.collabserv.com/t/#u\n>\n> -Peff\n\n\n\n-- \nWBR,\nArkady Shapkin aka Dragon\n"},{"id":"299341","messageId":"20160815130347.3isxpdlnuy7nldmk@sigill.intra.peff.net","threadId":"43851","inReplyTo":"CAB-zwL2P08YC=3Ube8mkZ=mB4xpW6TUnG2gEZKtvRU03eE6ALA@mail.gmail.com","subject":"Re: Git shallow clone branch doesn't work with recursive submodules cloning","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-08-15T13:03:48Z","receivedAt":"2016-08-15T13:06:38Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Aug 15, 2016 at 03:53:48PM +0300, Arkady Shapkin wrote:\n\n> So it will work only if github update their server configuration\n> (boringssl submodule on github)?\n\nCorrect.\n\n-Peff\n"}]}