git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Anupam Singh <anupamsingh610@gmail.com>
To: git@vger.kernel.org
Subject: Question about recurse-submodules
Date: Thu, 28 Nov 2019 17:33:15 +0530	[thread overview]
Message-ID: <CAJz+0yYpv55j0gmMDO3MfbJXzrfT5BJ7vKk9hzr_u3CLtM+WLw@mail.gmail.com> (raw)

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

                 reply	other threads:[~2019-11-28 12:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJz+0yYpv55j0gmMDO3MfbJXzrfT5BJ7vKk9hzr_u3CLtM+WLw@mail.gmail.com \
    --to=anupamsingh610@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).