git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Ryan Barker <rcbarke@clemson.edu>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Suggestion to Enhance Submodule Initialization Behavior During git clone
Date: Wed, 18 Sep 2024 11:05:21 +0100	[thread overview]
Message-ID: <c7d85f17-d9ad-464b-8cd5-e6d214f2fd06@gmail.com> (raw)
In-Reply-To: <SA1PR06MB80085741B5856945AAED1027BB612@SA1PR06MB8008.namprd06.prod.outlook.com>

Hi Ryan

On 17/09/2024 19:14, Ryan Barker wrote:
> Currently, when a user clones a Git repository with submodules, the 
> submodules defined in the |.gitmodules| file are not automatically 
> initialized in the local |.git/config| of the cloned repository.

One can pass '--recurse-submodules' when cloning which will recursively 
clone the submodules used by the repository and sets 'submodule.active'.

Best Wishes

Phillip

> While I 
> understand there may be edge cases where this behavior is desirable, it 
> would significantly improve usability if there were an option to 
> automatically initialize submodules during |git clone|. I believe this 
> could be accomplished by adding a flag, or perhaps enabling 
> auto-initialization by default, with an optional flag to disable it when 
> necessary.
> To mitigate this issue in my project, I created defensive scripts to 
> ensure that submodules are initialized before interacting with them, but 
> this was a point of confusion for many users who were unfamiliar with 
> submodules. In my opinion, auto-initializing submodules during the clone 
> process would be a more intuitive default behavior for most users, 
> especially those in educational environments, like students using GitHub 
> Classroom.
> I have attached my source code for further context, and my repository 
> can be found here: https://github.com/rcbarke/clemson-ece-2230-grading/ 
> <https://github.com/rcbarke/clemson-ece-2230-grading/>, though it is 
> private due to the grading scripts it contains.
> I would appreciate your thoughts on this suggestion and whether this 
> behavior could be incorporated into future Git releases.
> Thank you for your time!
> Best,
> *
> *
> *Ryan Barker*
> *
> *
> *Graduate Assistant*
> *IS-WiN Laboratory*
> M.S. Computer Engineering, Intelligent Systems, Class of 2026
> B.S. Computer Engineering, Communication Systems & Networks, Class of 2016
> 
> Logos | Clemson University, South Carolina <https://www.clemson.edu/>
> 
> 

      reply	other threads:[~2024-09-18 10:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-17 18:14 Suggestion to Enhance Submodule Initialization Behavior During git clone Ryan Barker
2024-09-18 10:05 ` Phillip Wood [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

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

  git send-email \
    --in-reply-to=c7d85f17-d9ad-464b-8cd5-e6d214f2fd06@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=rcbarke@clemson.edu \
    /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.
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 NNTP newsgroup(s).