-
Type:
Suggestion
-
Resolution: Unresolved
-
None
-
Component/s: UI
-
None
-
0
-
1
Issue Summary
Bitbucket UI does not show a hyperlink for a submodule when it points to a mirror. As Bitbucket only recognizes projects under its own base URL. Since mirrors have different base URLs, the the primary does not know how to parse the URL to get the repository.
Steps to Reproduce
- Initialize Git repository
git init - Add Submodule using Primary server URL
git submodule add ssh://git@bitbucket.upstream:7999/setest/submodule1.git - Add second Submodule using a Mirror server URL
git submodule add ssh://git@bitbucket.bmirror:7999/bitbucket/setest/submodule2.git - Stage and commit the changes
git add .
git commit -m "Initial Commit" - Push to Bitbucket
git push –all
Expected Results
Bitbucket creates a hyperlink for both submodules, the upstream and the mirror
Actual Results
The submodule pointing to the mirror does not have a hyperlink

Workaround
As a workaround, if you would like the submodules to be hyperlinked in the UI but want them to be fetched from the mirror, you can do the following:
- use the primary URL instead of the mirror URL in the submodule config
- use the Git url.<base>.insteadOf config to tell Git that when it sees the primary URL, it should download from the mirror URL