{"thread":{"id":"62130","subject":"Suggestion to Enhance Submodule Initialization Behavior During git clone","startedAt":"2024-09-17T18:14:14Z","lastAt":"2024-09-18T10:05:23Z","messageCount":2,"participants":["Ryan Barker","Phillip Wood"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"502964","messageId":"SA1PR06MB80085741B5856945AAED1027BB612@SA1PR06MB8008.namprd06.prod.outlook.com","threadId":"62130","inReplyTo":null,"subject":"Suggestion to Enhance Submodule Initialization Behavior During git clone","fromName":"Ryan Barker","fromEmail":"rcbarke@clemson.edu","sentAt":"2024-09-17T18:14:04Z","receivedAt":"2024-09-17T18:14:14Z","isPatch":false,"sender":{"key":"rcbarke@clemson.edu","avatar":null},"body":"Hello,\nI 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.\nCurrently, 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.\nTo 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.\nI 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.\nI would appreciate your thoughts on this suggestion and whether this behavior could be incorporated into future Git releases.\nThank you for your time!\nBest,\n\nRyan Barker\n\nGraduate Assistant\nIS-WiN Laboratory\nM.S. Computer Engineering, Intelligent Systems, Class of 2026\nB.S. Computer Engineering, Communication Systems & Networks, Class of 2016\n\n[Logos | Clemson University, South Carolina]<https://www.clemson.edu/>\n\n\n"},{"id":"502995","messageId":"c7d85f17-d9ad-464b-8cd5-e6d214f2fd06@gmail.com","threadId":"62130","inReplyTo":"SA1PR06MB80085741B5856945AAED1027BB612@SA1PR06MB8008.namprd06.prod.outlook.com","subject":"Re: Suggestion to Enhance Submodule Initialization Behavior During git clone","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2024-09-18T10:05:21Z","receivedAt":"2024-09-18T10:05:23Z","isPatch":false,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Hi Ryan\n\nOn 17/09/2024 19:14, Ryan Barker wrote:\n> Currently, when a user clones a Git repository with submodules, the \n> submodules defined in the |.gitmodules| file are not automatically \n> initialized in the local |.git/config| of the cloned repository.\n\nOne can pass '--recurse-submodules' when cloning which will recursively \nclone the submodules used by the repository and sets 'submodule.active'.\n\nBest Wishes\n\nPhillip\n\n> While I \n> understand there may be edge cases where this behavior is desirable, it \n> would significantly improve usability if there were an option to \n> automatically initialize submodules during |git clone|. I believe this \n> could be accomplished by adding a flag, or perhaps enabling \n> auto-initialization by default, with an optional flag to disable it when \n> necessary.\n> To mitigate this issue in my project, I created defensive scripts to \n> ensure that submodules are initialized before interacting with them, but \n> this was a point of confusion for many users who were unfamiliar with \n> submodules. In my opinion, auto-initializing submodules during the clone \n> process would be a more intuitive default behavior for most users, \n> especially those in educational environments, like students using GitHub \n> Classroom.\n> I have attached my source code for further context, and my repository \n> can be found here: https://github.com/rcbarke/clemson-ece-2230-grading/ \n> <https://github.com/rcbarke/clemson-ece-2230-grading/>, though it is \n> private due to the grading scripts it contains.\n> I would appreciate your thoughts on this suggestion and whether this \n> behavior could be incorporated into future Git releases.\n> Thank you for your time!\n> Best,\n> *\n> *\n> *Ryan Barker*\n> *\n> *\n> *Graduate Assistant*\n> *IS-WiN Laboratory*\n> M.S. Computer Engineering, Intelligent Systems, Class of 2026\n> B.S. Computer Engineering, Communication Systems & Networks, Class of 2016\n> \n> Logos | Clemson University, South Carolina <https://www.clemson.edu/>\n> \n> \n"}]}