mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-20 16:11:46 +03:00
Fixes #2708
- Assumes all upstream branch names will start with 'refs/remotes/', then - slices out the remote branch name without making any assumptions as to what it's named, and - joins the rest of the split elements
This commit is contained in:
parent
7ebcd41fec
commit
2cb9711c54
@ -262,8 +262,7 @@ export class BaseBranch {
|
||||
branchUrl(upstreamBranchName: string | undefined) {
|
||||
if (!upstreamBranchName) return undefined;
|
||||
const baseBranchName = this.branchName.split('/')[1];
|
||||
const parts = upstreamBranchName.split('/');
|
||||
const branchName = parts[parts.length - 1];
|
||||
const branchName = upstreamBranchName.split('refs/remotes/')[1].split('/').slice(1).join('/');
|
||||
return `${this.repoBaseUrl.trim()}/compare/${baseBranchName}...${branchName}`;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user