From f1c461fccf05f38e6729a6cd7160dc9fdfbc1352 Mon Sep 17 00:00:00 2001 From: Michal Dorner Date: Mon, 12 Apr 2021 22:22:57 +0200 Subject: [PATCH] Fix logging inside ensureRefAvailable() --- dist/index.js | 8 +------- src/git.ts | 7 +------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/dist/index.js b/dist/index.js index df8c202..af2392b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4001,13 +4001,7 @@ function isGitSha(ref) { } exports.isGitSha = isGitSha; async function hasCommit(ref) { - core.startGroup(`Checking if commit for ${ref} is locally available`); - try { - return (await exec_1.default('git', ['cat-file', '-e', `${ref}^{commit}`], { ignoreReturnCode: true })).code === 0; - } - finally { - core.endGroup(); - } + return (await exec_1.default('git', ['cat-file', '-e', `${ref}^{commit}`], { ignoreReturnCode: true })).code === 0; } async function getCommitCount() { const output = (await exec_1.default('git', ['rev-list', '--count', '--all'])).stdout; diff --git a/src/git.ts b/src/git.ts index e1853bd..a9ac9b9 100644 --- a/src/git.ts +++ b/src/git.ts @@ -198,12 +198,7 @@ export function isGitSha(ref: string): boolean { } async function hasCommit(ref: string): Promise { - core.startGroup(`Checking if commit for ${ref} is locally available`) - try { - return (await exec('git', ['cat-file', '-e', `${ref}^{commit}`], {ignoreReturnCode: true})).code === 0 - } finally { - core.endGroup() - } + return (await exec('git', ['cat-file', '-e', `${ref}^{commit}`], {ignoreReturnCode: true})).code === 0 } async function getCommitCount(): Promise {