From 197ee88ce51bbcf96cb50e6cb2739ec03f6fd767 Mon Sep 17 00:00:00 2001 From: Max schwenk Date: Wed, 25 Feb 2026 18:44:33 -0500 Subject: [PATCH] Make showProgress a required argument for checkout and checkoutDetach Co-Authored-By: Claude Sonnet 4.6 --- dist/index.js | 2 +- src/git-command-manager.ts | 8 ++++---- src/git-directory-helper.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index 98aa668..ca0c9d1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1310,7 +1310,7 @@ function prepareExistingDirectory(git, repositoryPath, repositoryUrl, clean, ref core.startGroup('Removing previously created refs, to avoid conflicts'); // Checkout detached HEAD if (!(yield git.isDetached())) { - yield git.checkoutDetach(); + yield git.checkoutDetach(false); } // Remove all refs/heads/* let branches = yield git.branchList(false); diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 52419d6..f981004 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -22,8 +22,8 @@ export interface IGitCommandManager { disableSparseCheckout(): Promise sparseCheckout(sparseCheckout: string[]): Promise sparseCheckoutNonConeMode(sparseCheckout: string[]): Promise - checkout(ref: string, startPoint: string, showProgress?: boolean): Promise - checkoutDetach(showProgress?: boolean): Promise + checkout(ref: string, startPoint: string, showProgress: boolean): Promise + checkoutDetach(showProgress: boolean): Promise config( configKey: string, configValue: string, @@ -220,7 +220,7 @@ class GitCommandManager { ) } - async checkout(ref: string, startPoint: string, showProgress?: boolean): Promise { + async checkout(ref: string, startPoint: string, showProgress: boolean): Promise { const args = ['checkout', showProgress ? '--progress' : '--quiet', '--force'] if (startPoint) { args.push('-B', ref, startPoint) @@ -231,7 +231,7 @@ class GitCommandManager { await this.execGit(args) } - async checkoutDetach(showProgress?: boolean): Promise { + async checkoutDetach(showProgress: boolean): Promise { const args = ['checkout', '--detach', showProgress ? '--progress' : '--quiet'] await this.execGit(args) } diff --git a/src/git-directory-helper.ts b/src/git-directory-helper.ts index 9a0085f..cfda43e 100644 --- a/src/git-directory-helper.ts +++ b/src/git-directory-helper.ts @@ -49,7 +49,7 @@ export async function prepareExistingDirectory( core.startGroup('Removing previously created refs, to avoid conflicts') // Checkout detached HEAD if (!(await git.isDetached())) { - await git.checkoutDetach() + await git.checkoutDetach(false) } // Remove all refs/heads/*