We have quite a few repositories with submodules and we would like to report which submodules are candidates for upgrading because the repository they refer to has new commits. Is there a way to do this without changing the currently checked out version?
basically there are 3 different commits that we would like to know about;
1) the commit to which origin's containing repository is pointing to
2) the commit to which the local containing repository is pointing to (this might be different from 1 because of a manual pull of the submodule
3) the head of the submodule repository.
If local is behind origin we would like to do a submodule update.
If local is ahead origin, we don't want to do a submodule update because it is probably changed by the developer.
If local is behind the head of the submodule repository, we would like to get a warning.