Commit a7be1116 authored by mickadoo's avatar mickadoo

68: Add fetch method

parent e81b00d7
......@@ -47,6 +47,21 @@ class GitTools {
}
}
/**
* @param $repoPath
*
* @throws \Exception
*/
public function fetch($repoPath) {
$process = new Process('git fetch', $repoPath);
$process->run();
if (!$process->isSuccessful()) {
$msg = "Unable to run 'git fetch'. Output: " . $process->getErrorOutput();
throw new \Exception($msg);
}
}
/**
* If we are on the not on the correct branch, attempt to check it out
* (first locally, then remotely).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment