Git - Only use this.dotGit when resolving HEAD (#165497)

Fix #164363
This commit is contained in:
Ladislau Szomoru
2022-11-05 07:15:42 +01:00
committed by GitHub
parent 7acbd9df69
commit 08baa8abb4

View File

@@ -2067,7 +2067,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);