Source view URL of branch name with slashes broken (e.g. "feat/foo")

XMLWordPrintable

    • 4
    • Severity 3 - Minor
    • 3,578

      Related issue: BCLOUD-408

      I maintain a popular utility called git-open which opens a browser to your bitbucket/github/gitlab to view whatever branch you have checked out.

      Bitbucket makes this pretty difficult if there's a slash in the branch name. (Which it surprisingly common


      For example, in the Guyzmo/git-repo project, following the official docs I can view the devel branch with this URL:
      https://bitbucket.org/guyzmo/git-repo/src/devel

      Easy enough, but here's the problem:

      For the bugfix/conftest_fix branch, bitbucket provides a 404 for a similar URL: https://bitbucket.org/guyzmo/git-repo/src/bugfix/conftest_fix
      And we get the same result if we URL-encode the slash: https://bitbucket.org/guyzmo/git-repo/src/bugfix%2Fconftest_fix

      When using the site to view the branch we get a /src/<commit hash>/?at=<branch/name> URL. So while this is a workaround, it makes for more awkward ergonomics. :/


      Ideally, a fix would make either of the above 404'ing URLs start to work. Thanks!

            Assignee:
            Unassigned
            Reporter:
            paulirish
            Votes:
            53 Vote for this issue
            Watchers:
            45 Start watching this issue

              Created:
              Updated: