Git Mailing List Archive on lore.kernel.org
 help / color / Atom feed
* Question about recurse-submodules
@ 2019-11-28 12:03 Anupam Singh
  0 siblings, 0 replies; only message in thread
From: Anupam Singh @ 2019-11-28 12:03 UTC (permalink / raw)
  To: git

Hi,

I have been facing an issue when recursing over submodules during git clone.

TLDR : Create a project with multiple submodules with different access
rights for different users. When a user clones the main project she
should get only the submodules she is allowed to access.

Consider following example :

I want to make a repo named MainProject with submodules Sub1 and Sub2 as shown
MainProject (Accessible)
      |-> Sub1 (Accessible)
      |-> Sub2 (Inaccesible)
      |-> README.md

Where I have rights to MainProject and Sub1 but not Sub2. What I want
is when I clone MainProject with --recurse-submodules it recurse
through all the submodules and try to clone it. If it fails it should
move to next submodule, but what happens is that it fails and exits.

Also I know that I can pass the submodules' pathspec that I want to
recurse after the commit clone: teach --recurse-submodules to
optionally take a pathspec to https://github.com/git/git.git. But I
dont want to specify this because there may be multiple submodules and
clone command can get lengthy. Also the user will have to know what
folder she has rights to.

I am kind of stuck and need assisstance. Is there another way to achieve this?
Any assistance would be appreciated.

PS : I'm a fan of GIT :)

Regards,
Anupam

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-28 12:03 Question about recurse-submodules Anupam Singh

Git Mailing List Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/git/0 git/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 git git/ https://lore.kernel.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.git


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git