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

Commit

Permalink
fix(vscode-github): current branch detection
Browse files Browse the repository at this point in the history
  • Loading branch information
KnisterPeter committed Nov 9, 2016
1 parent 9c20ffe commit 719e908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function getGitHubOwnerAndRepository(cwd: string): Promise<string[]
export async function getCurrentBranch(cwd: string): Promise<string|undefined> {
return execa('git', ['status', '--porcelain', '--branch'], {cwd})
.then(result => {
const match = result.stdout.match(/^## (.+?)(?:\.\.\..*)?/);
const match = result.stdout.match(/^## ([^.]+)(?:\.\.\..*)?/);
return match ? match[1] : undefined;
});
}
Expand Down

0 comments on commit 719e908

Please sign in to comment.