diff --git a/src/applications/diffusion/protocol/DiffusionCommandEngine.php b/src/applications/diffusion/protocol/DiffusionCommandEngine.php --- a/src/applications/diffusion/protocol/DiffusionCommandEngine.php +++ b/src/applications/diffusion/protocol/DiffusionCommandEngine.php @@ -120,6 +120,7 @@ public function newFuture() { $argv = $this->newCommandArgv(); $env = $this->newCommandEnvironment(); + $is_passthru = $this->getPassthru(); if ($this->getSudoAsDaemon()) { $command = call_user_func_array('csprintf', $argv); @@ -127,7 +128,7 @@ $argv = array('%C', $command); } - if ($this->getPassthru()) { + if ($is_passthru) { $future = newv('PhutilExecPassthru', $argv); } else { $future = newv('ExecFuture', $argv); @@ -139,7 +140,9 @@ // to try to avoid cases where `git fetch` hangs for some reason and we're // left sitting with a held lock forever. $repository = $this->getRepository(); - $future->setTimeout($repository->getEffectiveCopyTimeLimit()); + if (!$is_passthru) { + $future->setTimeout($repository->getEffectiveCopyTimeLimit()); + } return $future; }