{"thread":{"id":"52367","subject":"Question about recurse-submodules","startedAt":"2019-11-28T12:03:28Z","lastAt":"2019-11-28T12:03:28Z","messageCount":1,"participants":["Anupam Singh"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"387275","messageId":"CAJz+0yYpv55j0gmMDO3MfbJXzrfT5BJ7vKk9hzr_u3CLtM+WLw@mail.gmail.com","threadId":"52367","inReplyTo":null,"subject":"Question about recurse-submodules","fromName":"Anupam Singh","fromEmail":"anupamsingh610@gmail.com","sentAt":"2019-11-28T12:03:15Z","receivedAt":"2019-11-28T12:03:28Z","isPatch":false,"sender":{"key":"anupamsingh610@gmail.com","avatar":null},"body":"Hi,\n\nI have been facing an issue when recursing over submodules during git clone.\n\nTLDR : Create a project with multiple submodules with different access\nrights for different users. When a user clones the main project she\nshould get only the submodules she is allowed to access.\n\nConsider following example :\n\nI want to make a repo named MainProject with submodules Sub1 and Sub2 as shown\nMainProject (Accessible)\n      |-> Sub1 (Accessible)\n      |-> Sub2 (Inaccesible)\n      |-> README.md\n\nWhere I have rights to MainProject and Sub1 but not Sub2. What I want\nis when I clone MainProject with --recurse-submodules it recurse\nthrough all the submodules and try to clone it. If it fails it should\nmove to next submodule, but what happens is that it fails and exits.\n\nAlso I know that I can pass the submodules' pathspec that I want to\nrecurse after the commit clone: teach --recurse-submodules to\noptionally take a pathspec to https://github.com/git/git.git. But I\ndont want to specify this because there may be multiple submodules and\nclone command can get lengthy. Also the user will have to know what\nfolder she has rights to.\n\nI am kind of stuck and need assisstance. Is there another way to achieve this?\nAny assistance would be appreciated.\n\nPS : I'm a fan of GIT :)\n\nRegards,\nAnupam\n"}]}