I want to define an associated SHA-1 submodule without cloning anything, i.e. remotely. git -ls-remote does not show this information, so my initial approach was to clear XHTML from gitweb and pull out SHA-1.
Unfortunately, gitweb seems to support submodules pretty poorly, displaying 404 and 500 "unknown objects" errors when trying to view history for the path associated with it. Therefore, it is not possible for me to determine the associated SHA-1 submodule if I cannot determine the exact commit that modified git-link and then parsed diff for something like:
-Subproject commit 706187649544cb029b617548771fe96c1693be39 +Subproject commit f05b9854fca9a2e1f47449e563a33156c1085646
Unfortunately, gitweb is so broken with submodules that I canโt find a way to determine which commit this diff contains, so unless I do an exhaustive search through each commit, it is not-go.
I tried with gitweb bundled with git 1.6.4.2 and 1.6.6.1 (last stable).
Someone might think of a solution, or perhaps an alternative way to do this without cloning each repository. You see, I want to do this for all repositories in our organization and for each branch in each repository and for many branches. I do this to get a list of all the submodule commits and determine if they are deprecated.
If the only solution is to individually clone each repository and execute queries internally, then that should be it. Unfortunately, some of our repositories are quite large, so this will make the whole operation very slow.
source share