Skip to content

Commit

Permalink
Git - Only use this.dotGit when resolving HEAD (#165497)
Browse files Browse the repository at this point in the history
  • Loading branch information
lszomoru committed Nov 8, 2022
1 parent 8fa188b commit 681383d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/git/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,7 @@ export class Repository {
}

async getHEADFS(): Promise<Ref> {
const raw = await fs.readFile(path.join(this.dotGit.commonPath ?? this.dotGit.path, 'HEAD'), 'utf8');
const raw = await fs.readFile(path.join(this.dotGit.path, 'HEAD'), 'utf8');

// Branch
const branchMatch = raw.match(/^ref: refs\/heads\/(?<name>.*)$/m);
Expand Down

0 comments on commit 681383d

Please sign in to comment.