This reverts commit 6011bf7e7a.
This commit is contained in:
Ladislau Szomoru
2022-03-09 20:28:36 +01:00
parent 5a7db04b89
commit fa5aa53695

View File

@@ -2028,6 +2028,7 @@ export class Repository {
if (branchName.startsWith('refs/heads/')) {
branchName = branchName.substring(11);
const index = upstream.indexOf('/');
let ahead;
let behind;
@@ -2040,8 +2041,8 @@ export class Repository {
type: RefType.Head,
name: branchName,
upstream: upstream ? {
name: upstream.substring(upstream.length - branchName.length),
remote: upstream.substring(0, upstream.length - branchName.length - 1)
name: upstream.substring(index + 1),
remote: upstream.substring(0, index)
} : undefined,
commit: ref || undefined,
ahead: Number(ahead) || 0,