From e5f9d355fb68ef1d029433ddfb0a3aa1a56fafdb Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Mon, 31 Jan 2022 09:49:59 +0900 Subject: [PATCH] fix: add '--' to checkout command to avoid ambiguity (#1051) * fix: add '--' to checkout command to avoid ambiguity Signed-off-by: Kenji Miyake * Update src/git-command-manager.ts Co-authored-by: Peter Evans <18365890+peter-evans@users.noreply.github.com> Co-authored-by: Peter Evans <18365890+peter-evans@users.noreply.github.com> --- dist/index.js | 2 ++ src/git-command-manager.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dist/index.js b/dist/index.js index b2024d089..77ba7a173 100644 --- a/dist/index.js +++ b/dist/index.js @@ -650,6 +650,8 @@ class GitCommandManager { else { args.push(ref); } + // https://github.com/git/git/commit/a047fafc7866cc4087201e284dc1f53e8f9a32d5 + args.push('--'); yield this.exec(args); }); } diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 8dc6a9b51..367f796c0 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -32,6 +32,8 @@ export class GitCommandManager { } else { args.push(ref) } + // https://github.com/git/git/commit/a047fafc7866cc4087201e284dc1f53e8f9a32d5 + args.push('--') await this.exec(args) }