Consider current branch for open command
When using the Bitbucket: Open
command, take into account the current git branch and open the same branch in Bitbucket.
For example, if I am looking at a file in VS Code that exists on the develop
branch, but not on the master
branch, the Bitbucket: Open
command will attempt to display the file from the default branch in Bitbucket (master
in this case). The attempt will fail as the file doesn't exist in that branch. The desired action is that the extension will open Bitbucket at the specified branch (develop
in this case).
In my example, rather than the following: https://bitbucket.example.com/projects/PROJ/repos/repo-name/browse/filename.json#23-23
Open the following: https://bitbucket.example.com/projects/PROJ/repos/repo-name/browse/filename.json?at=refs%2Fheads%2Fdevelop#23-23
This is using Bitbucket Server.