Ability to create submodules hyperlinked with mirror URL

XMLWordPrintable

    • 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

      1. Initialize Git repository
        git init
      2. Add Submodule using Primary server URL
        git submodule add ssh://git@bitbucket.upstream:7999/setest/submodule1.git
      3. Add second Submodule using a Mirror server URL
        git submodule add ssh://git@bitbucket.bmirror:7999/bitbucket/setest/submodule2.git
      4. Stage and commit the changes
        git add .
        git commit -m "Initial Commit"
      5. 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

              Assignee:
              Unassigned
              Reporter:
              Aaron Harbertson
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: