Skip to content

Commit 0dcd852

Browse files
committed
Fixes path splitting logic in BitbucketServerRemote (#3218)
1 parent 289fb9e commit 0dcd852

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
2525

2626
### Fixed
2727

28+
- Fixes [#3218](https://github.com/gitkraken/vscode-gitlens/issues/3218) - Bitbucket Server remote - "scm/" path prefix not removed (regression)
2829
- Fixes avoid eagerly getting "full" commit details for inline blame ([#4115])(https://github.com/gitkraken/vscode-gitlens/issues/4115))
2930
- Fixes large commit messages work poorly on Commit Graph ([#4100](https://github.com/gitkraken/vscode-gitlens/issues/4100))
3031
- Fixes _Show \* View_ commands fail intermittently ([#4127](https://github.com/gitkraken/vscode-gitlens/issues/4127))

src/git/remotes/bitbucket-server.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ export class BitbucketServerRemote extends RemoteProvider {
5555
}
5656

5757
protected override splitPath(): [string, string] {
58-
if (this.path.startsWith('scm/')) {
58+
if (this.path.startsWith('scm/') && this.path.indexOf('/') !== this.path.lastIndexOf('/')) {
5959
const path = this.path.replace('scm/', '');
6060
const index = path.indexOf('/');
61-
return [this.path.substring(0, index), this.path.substring(index + 1)];
61+
return [path.substring(0, index), path.substring(index + 1)];
6262
}
6363

6464
return super.splitPath();

0 commit comments

Comments
 (0)