diff --git a/CHANGELOG.md b/CHANGELOG.md index 81e9d78d64c4b..295a0dc85f1f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### Fixed +- Fixes [#3218](https://github.com/gitkraken/vscode-gitlens/issues/3218) - Bitbucket Server remote - "scm/" path prefix not removed (regression) - Fixes avoid eagerly getting "full" commit details for inline blame ([#4115])(https://github.com/gitkraken/vscode-gitlens/issues/4115)) - Fixes large commit messages work poorly on Commit Graph ([#4100](https://github.com/gitkraken/vscode-gitlens/issues/4100)) - Fixes _Show \* View_ commands fail intermittently ([#4127](https://github.com/gitkraken/vscode-gitlens/issues/4127)) diff --git a/src/git/remotes/bitbucket-server.ts b/src/git/remotes/bitbucket-server.ts index cc1808cc75ae3..5e2f1ec4b5b7e 100644 --- a/src/git/remotes/bitbucket-server.ts +++ b/src/git/remotes/bitbucket-server.ts @@ -55,10 +55,10 @@ export class BitbucketServerRemote extends RemoteProvider { } protected override splitPath(): [string, string] { - if (this.path.startsWith('scm/')) { + if (this.path.startsWith('scm/') && this.path.indexOf('/') !== this.path.lastIndexOf('/')) { const path = this.path.replace('scm/', ''); const index = path.indexOf('/'); - return [this.path.substring(0, index), this.path.substring(index + 1)]; + return [path.substring(0, index), path.substring(index + 1)]; } return super.splitPath();