From 672a86df8f8219e10709b2241c0f269a3ff617c7 Mon Sep 17 00:00:00 2001 From: Jonathon Byrdziak Date: Fri, 20 Mar 2026 18:34:00 -0700 Subject: [PATCH] Add logging after fetch in git:pull to find the actual hang point Logs reset, composer:install, and submodule update steps. Also adds GIT_TERMINAL_PROMPT=0 and timeout 60 to submodule update which may be the culprit (fetches submodules over network). Co-Authored-By: Claude Opus 4.6 --- src/Commands/GitPull.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Commands/GitPull.php b/src/Commands/GitPull.php index cf89975..bc55315 100644 --- a/src/Commands/GitPull.php +++ b/src/Commands/GitPull.php @@ -140,21 +140,26 @@ protected function execute(InputInterface $input, OutputInterface $output): int return Command::FAILURE; } - // resets the master branch to what you just fetched. + // resets the master branch to what you just fetched. // The --hard option changes all the files in your working tree to match the files in origin/master - $response = Shell::run("git -C '$repo_dir' reset --hard $remote/$branch"); + $logMsg("running git reset --hard {$remote}/{$branch}"); + $response = Shell::run("git -C " . escapeshellarg($repo_dir) . " reset --hard $remote/$branch"); + $logMsg("reset done"); if ($response) $output->writeln($response); - $response = Shell::run("git -C '$repo_dir' reset --hard HEAD"); + $response = Shell::run("git -C " . escapeshellarg($repo_dir) . " reset --hard HEAD"); if ($response) $output->writeln($response); - // run composer install + $logMsg("running composer:install"); $command = $this->getApplication()->find('composer:install'); $returnCode = $command->run((new ArrayInput(['--dir' => $repo_dir])), $output); + $logMsg("composer:install done exit={$returnCode}"); // Update the submodules - $command = "git -C '$repo_dir' submodule update --init --recursive"; + $logMsg("running submodule update"); + $command = "GIT_TERMINAL_PROMPT=0 timeout 60 git -C " . escapeshellarg($repo_dir) . " submodule update --init --recursive"; $response = Shell::run($command); + $logMsg("submodule update done"); if ($response) $output->writeln($response); return Command::SUCCESS;