git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Geoffrey Knopf <gknopf@spideroak-inc.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [EXT] Re: Feature Request: Submodule Warning When Cloning Repos
Date: Fri, 17 Sep 2021 16:26:11 +0000	[thread overview]
Message-ID: <SA1PR17MB4610F6F2BA6BC9D220EC5C4B9BDD9@SA1PR17MB4610.namprd17.prod.outlook.com> (raw)
In-Reply-To: <3ff1426a-73a4-731e-3b6f-269d9a900019@gmail.com>

Yeah could be a note. Thinking it could be printed to stdout when cloning.
I don't think there should be a prompt because that would interfere with automated cloning which needs to continue working.

Something like this:
"Note: This repo contains submodules which were not cloned:
- Submodule A
- Submodule B
Try the '--recurse-submodules' option next time to clone them automatically.
Or run 'git submodule init && git submodule update' to clone them now."

It doesn't need to print out every time a repo with submodules is cloned.
Only when a repo with submodules is cloned and the "--recurse-submodules" option was not used.
In other words, if there are submodules which have not been cloned/initialized/updated.

Backstory:
I've encountered a few situations where developers cloned a repo that they didn't know contained submodules.
Sometimes it was their first time encountering a repo with submodules so they didn't know to be on the lookout for that.
They tried to build per README instructions and it failed.
Then someone that knew there were submodules had to inform them to run 'git submodule init && git submodule update'.
To cover all bases, the submodules and git commands for cloning them had to be documented in the README.
This adds overhead to the READMEs of all projects containing submodules or causes development time to be lost.
I believe that if git printed the note mentioned above it would make cloning repos with submodules more intuitive and user-friendly.


From: Bagas Sanjaya <bagasdotme@gmail.com>
Sent: Thursday, September 16, 2021 10:23 PM
To: Geoffrey Knopf <gknopf@spideroak-inc.com>; git@vger.kernel.org <git@vger.kernel.org>
Subject: [EXT] Re: Feature Request: Submodule Warning When Cloning Repos 
 
On 16/09/21 23.59, Geoffrey Knopf wrote:
> Problem:
> Easy to forget to clone submodules.
> 
> Existing Solutions:
> Always clone repos that have submodules with the "--recurse-submodules" option.
> Manually look inside the git ".submodules" file to see if there are any submodules and initialize and update them.
> 
> Request:
> When performing a clone, warn the user if there are any submodules that have not been cloned.
> Recommend that the user try the "--recurse-submodules" option next time or initialize and update the submodules.
> 

I don't think warning should be granted in this case. Maybe better as note?

 From what you wrote above, did you mean print the message when cloning 
any repo with submodules?

-- 
An old man doll... just what I always wanted! - Clara

      reply	other threads:[~2021-09-17 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 16:59 Feature Request: Submodule Warning When Cloning Repos Geoffrey Knopf
2021-09-17  5:23 ` Bagas Sanjaya
2021-09-17 16:26   ` Geoffrey Knopf [this message]

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=SA1PR17MB4610F6F2BA6BC9D220EC5C4B9BDD9@SA1PR17MB4610.namprd17.prod.outlook.com \
    --to=gknopf@spideroak-inc.com \
    --cc=bagasdotme@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).