{"thread":{"id":"61492","subject":"Cloning a clone with (relative) submodules","startedAt":"2024-05-16T13:21:00Z","lastAt":"2024-05-16T13:21:00Z","messageCount":1,"participants":["Sterling, Brett A. (JSC-EG411)[Odyssey Space Research L.L.C.]"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"494887","messageId":"BLAPR09MB707587D4900A66FC8C405793BFED2@BLAPR09MB7075.namprd09.prod.outlook.com","threadId":"61492","inReplyTo":null,"subject":"Cloning a clone with (relative) submodules","fromName":"Sterling, Brett A. (JSC-EG411)[Odyssey Space Research L.L.C.]","fromEmail":"brett.a.sterling@nasa.gov","sentAt":"2024-05-16T13:20:58Z","receivedAt":"2024-05-16T13:21:00Z","isPatch":false,"sender":{"key":"brett.a.sterling@nasa.gov","avatar":null},"body":"Thank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\nCreated <ssh_repo_addr> including a submodule that is specified (in .gitmodules) as a relative path\ngit clone <ssh_repo_addr> origClone\ngit clone clone testClone\n\nWhat did you expect to happen? (Expected behavior)\n\nI expected 'testClone' to be a valid clone of origClone.  However, because the submodules are specified as a relative path, this no longer works.\n\nWhat happened instead? (Actual behavior)\n\nfatal: repository '<local_path>' does not exist\nfatal: clone of '<local_path_to_relative_submodule_director>' into submodule path '<local_path_to_submodule_in_testClone>' failed\n\n\nWhat's different between what you expected and what actually happened?\n\nSee the error message above\n\n\nAnything else you want to add:\n\nThe issue is that when a clone is made with submoodules that contain a relative path, the relative path is maintained verbatim.  What I believe _should_ happen is that when cloning with submodules, any submodule path should be replaced with a path relative to what is being cloned.  This would maintain the idea that the new clone reflects the first clone as the origin.\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.39.3\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 4.18.0-513.24.1.el8_9.x86_64 #1 SMP Thu Mar 14 14:20:09 EDT 2024 x86_64\ncompiler info: gnuc: 8.5\nlibc info: glibc: 2.28\n$SHELL (typically, interactive shell): /bin/tcsh\n\n\n[Enabled Hooks]\n"}]}