From 37a9f55e1200aa6d1e1407439dad793dd657fec6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 01:42:08 +0000 Subject: [PATCH 1/2] Initial plan From 5c22fd92d2d8d170f5db69126fa03e00f8bcd495 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 01:48:08 +0000 Subject: [PATCH 2/2] Changes before error encountered Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- actions/setup/js/push_repo_memory.cjs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/actions/setup/js/push_repo_memory.cjs b/actions/setup/js/push_repo_memory.cjs index 055669ac25e..909c4e9b867 100644 --- a/actions/setup/js/push_repo_memory.cjs +++ b/actions/setup/js/push_repo_memory.cjs @@ -3,7 +3,6 @@ const fs = require("fs"); const path = require("path"); -const { execSync } = require("child_process"); const { getErrorMessage } = require("./error_helpers.cjs"); const { globPatternToRegex } = require("./glob_pattern_helpers.cjs"); @@ -95,7 +94,7 @@ async function main() { // This is necessary because checkout was configured with sparse-checkout core.info(`Disabling sparse checkout...`); try { - execSync("git sparse-checkout disable", { stdio: "pipe" }); + await exec.exec("git", ["sparse-checkout", "disable"], { ignoreReturnCode: true, silent: true }); } catch (error) { // Ignore if sparse checkout wasn't enabled core.info("Sparse checkout was not enabled or already disabled"); @@ -108,14 +107,14 @@ async function main() { // Try to fetch the branch try { - execSync(`git fetch "${repoUrl}" "${branchName}:${branchName}"`, { stdio: "pipe" }); - execSync(`git checkout "${branchName}"`, { stdio: "inherit" }); + await exec.exec("git", ["fetch", repoUrl, `${branchName}:${branchName}`], { silent: true }); + await exec.exec("git", ["checkout", branchName]); core.info(`Checked out existing branch: ${branchName}`); } catch (fetchError) { // Branch doesn't exist, create orphan branch core.info(`Branch ${branchName} does not exist, creating orphan branch...`); - execSync(`git checkout --orphan "${branchName}"`, { stdio: "inherit" }); - execSync("git rm -rf . || true", { stdio: "pipe" }); + await exec.exec("git", ["checkout", "--orphan", branchName]); + await exec.exec("git", ["rm", "-rf", "."], { ignoreReturnCode: true, silent: true }); core.info(`Created orphan branch: ${branchName}`); } } catch (error) {