Say I fix a bug in a common submodule used by multiple projects.
Is there a way to automatically notify the developers of all the super-projects to update the submodule?
Say I fix a bug in a common submodule used by multiple projects.
Is there a way to automatically notify the developers of all the super-projects to update the submodule?
Is there a way to automatically notify the developers of all the super-projects to update the submodule
No.
A submodule is a clone of an upstream repo, nested in a parent repo.
It is a downstream repo compared to the original repo you cloned as a submodule.
And in a distributed environment, you simply don't know of the downstream repos.
You only know of the upstream repo.
See "Definition of “downstream” and “upstream”".
As mentioned in "Update git submodule", you would need to go in the submodule and git pull
directly in there in order to update said submodule.
You could add a post-commit hook to send out emails.
You could get the email of all committers on the branch using (bash syntax)
git log --pretty:format="%ce" | sort | uniq
Or alternatively, enforce the developer to
git pull --recurse-submodules
to always be on the latest version of all submodules with every pull. May or may not be a good idea if there are breaking changes pushed, depending on how you want to enforce this.