Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsciple committed Jan 2, 2020
1 parent d7ab4a7 commit 1571d4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Expand Up @@ -4888,7 +4888,7 @@ class GitCommandManager {
isDetached() {
return __awaiter(this, void 0, void 0, function* () {
// Note, "branch --show-current" would be simpler but isn't available until Git 2.22
const output = yield this.execGit(['rev-parse', '--symbolic-full-name', 'HEAD'], true);
const output = yield this.execGit(['rev-parse', '--symbolic-full-name', '--verify', '--quiet', 'HEAD'], true);
return !output.stdout.trim().startsWith('refs/heads/');
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/git-command-manager.ts
Expand Up @@ -172,7 +172,7 @@ class GitCommandManager {
async isDetached(): Promise<boolean> {
// Note, "branch --show-current" would be simpler but isn't available until Git 2.22
const output = await this.execGit(
['rev-parse', '--symbolic-full-name', 'HEAD'],
['rev-parse', '--symbolic-full-name', '--verify', '--quiet', 'HEAD'],
true
)
return !output.stdout.trim().startsWith('refs/heads/')
Expand Down

0 comments on commit 1571d4f

Please sign in to comment.