git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Suggestion to Enhance Submodule Initialization Behavior During git clone

From
RBRyan Barker <rcbarke@clemson.edu>
Date
Sep 17, 2024, 18:14 UTC
Message-ID
<SA1PR06MB80085741B5856945AAED1027BB612@SA1PR06MB8008.namprd06.prod.outlook.com>

Hello, I have been working on extending GitHub Classroom's grading workflow by integrating submodules to streamline the grading process. Through this work, I have encountered limitations related to how submodules are handled when a repository is cloned. 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. 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/, 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/>
Next: Phillip Wood
Message 1 of 2 in “Suggestion to Enhance Submodule Initialization Behavior During git clone”
  1. Ryan BarkerSep 17, 2024
  2. Phillip WoodSep 18, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.