File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,15 @@ elif [[ "${#pathargs[@]}" -ge 3 && ${pathargs[${#pathargs[@]} - 3]} == 'scm' ]];
199199 pathargs=(${pathPref[@]} ' projects' ${pathargs[${#pathargs[@]} - 2]} ' repos' " ${pathargs[@]: ${# pathargs[@]} - 1} " )
200200 IFS=' /' urlpath=" ${pathargs[*]} "
201201 providerBranchRef=" /browse?at=$remote_ref "
202+ elif [[ " $domain " == * " bitbucket" * ]] && [[ $gitprotocol == ' ssh' ]]; then
203+ # bitbucket repo cloned with ssh will not have /scm/ segment in url path
204+ # e.g. /ppp/test-repo.git
205+
206+ # Build the repo url starting with 'projects' and then keep the first argument, the string 'repos', and finally the rest of the arguments.
207+ # shellcheck disable=SC2206
208+ pathargs=(' projects' ${pathargs[${#pathargs[@]} - 2]} ' repos' " ${pathargs[@]: ${# pathargs[@]} - 1} " )
209+ IFS=' /' urlpath=" ${pathargs[*]} "
210+ providerBranchRef=" /browse?at=$remote_ref "
202211elif [[ " ${# pathargs[@]} " -ge ' 2' && ${pathargs[${#pathargs[@]} - 2]} == ' _git' ]]; then
203212 # Visual Studio Team Services and Team Foundation Server always have /_git/ as the second to last segment in the url path
204213 if (( is_issue )) ; then
You can’t perform that action at this time.
0 commit comments