Skip to content

Commit 1571d4f

Browse files
committed
.
1 parent d7ab4a7 commit 1571d4f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4888,7 +4888,7 @@ class GitCommandManager {
48884888
isDetached() {
48894889
return __awaiter(this, void 0, void 0, function* () {
48904890
// Note, "branch --show-current" would be simpler but isn't available until Git 2.22
4891-
const output = yield this.execGit(['rev-parse', '--symbolic-full-name', 'HEAD'], true);
4891+
const output = yield this.execGit(['rev-parse', '--symbolic-full-name', '--verify', '--quiet', 'HEAD'], true);
48924892
return !output.stdout.trim().startsWith('refs/heads/');
48934893
});
48944894
}

src/git-command-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class GitCommandManager {
172172
async isDetached(): Promise<boolean> {
173173
// Note, "branch --show-current" would be simpler but isn't available until Git 2.22
174174
const output = await this.execGit(
175-
['rev-parse', '--symbolic-full-name', 'HEAD'],
175+
['rev-parse', '--symbolic-full-name', '--verify', '--quiet', 'HEAD'],
176176
true
177177
)
178178
return !output.stdout.trim().startsWith('refs/heads/')

0 commit comments

Comments
 (0)