failed to update submodules after submodule rename (original) (raw)
Hey, it appears that after renaming a submodule's directory, it's possible for the cached git source to fail to update submodules with an error like:
#4 [internal] load git source https://github.com/returntocorp/semgrep.git#refs/pull/8735/merge
#4 0.380 01d791c9d81fe68a1e95d9af0669033fbd586cc7 refs/pull/8735/merge
#4 0.807 fatal: No url found for submodule path 'languages/dart/tree-sitter/semgrep-dart' in .gitmodules
#4 ERROR: failed to update submodules for https://github.com/returntocorp/semgrep.git: exit status 128
Ex: https://github.com/returntocorp/semgrep/actions/runs/6206336967/job/16850481400#step:6:56
I'm not sure if there's a way to make git properly update the local cache given a submodule rename, or if some other solution would be better. Other projects like the actions/checkout GitHub Action call git submodule status and use a non-zero exit code to mean that the entire local repo should be deleted and re-cloned: