From fcc9b5f918c8b5df57b4bc7eeed67e273c9d776b Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 17 Nov 2023 10:30:49 -0800 Subject: [PATCH] Always reset checkout on bisect reset --- .changeset/hip-jokes-attend.md | 5 +++++ src/git.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/hip-jokes-attend.md diff --git a/.changeset/hip-jokes-attend.md b/.changeset/hip-jokes-attend.md new file mode 100644 index 0000000..e4d2c99 --- /dev/null +++ b/.changeset/hip-jokes-attend.md @@ -0,0 +1,5 @@ +--- +"every-ts": patch +--- + +Always reset checkout on bisect reset diff --git a/src/git.ts b/src/git.ts index 7cb3a47..bab0449 100644 --- a/src/git.ts +++ b/src/git.ts @@ -59,7 +59,9 @@ export class Bisect extends BaseCommand { let shouldReset = false; const bisectInfo = await getBisectInfo(); - if (this.subcommand === `start` && revs.length >= 2) { + if (this.subcommand === `reset`) { + shouldReset = true; + } else if (this.subcommand === `start` && revs.length >= 2) { shouldReset = true; } else if (bisectInfo?.terms.size === 2) { shouldReset = true;