From 771ed93a21a7177273819c979931cbd222039466 Mon Sep 17 00:00:00 2001 From: Steve Bourassa <115806656+SB4597@users.noreply.github.com> Date: Wed, 4 Oct 2023 16:37:08 -0400 Subject: [PATCH] Fix cases where there is a "HEAD" file or folder at the root of the repo (or, for Windows, Head, head, etc) by making sure HEAD is not treated as a filename --- src/git-command-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 7752cfa..5252b0d 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -471,7 +471,7 @@ class GitCommandManager { } async tryReset(): Promise { - const output = await this.execGit(['reset', '--hard', 'HEAD'], true) + const output = await this.execGit(['reset', '--hard', 'HEAD', '--'], true) return output.exitCode === 0 }