Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 719e908

Browse files
committed
fix(vscode-github): current branch detection
1 parent 9c20ffe commit 719e908

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/git.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export async function getGitHubOwnerAndRepository(cwd: string): Promise<string[]
1414
export async function getCurrentBranch(cwd: string): Promise<string|undefined> {
1515
return execa('git', ['status', '--porcelain', '--branch'], {cwd})
1616
.then(result => {
17-
const match = result.stdout.match(/^## (.+?)(?:\.\.\..*)?/);
17+
const match = result.stdout.match(/^## ([^.]+)(?:\.\.\..*)?/);
1818
return match ? match[1] : undefined;
1919
});
2020
}

0 commit comments

Comments
 (0)