From: Vincent Vanwaelscappel Date: Tue, 6 Sep 2022 16:14:45 +0000 (+0200) Subject: wip #5437 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7af79fc34fb7afaaca8b2de088c04172293f06f4;p=cubist_util.git wip #5437 @0.25 --- diff --git a/src/CommandLine/Git.php b/src/CommandLine/Git.php index 9eb3f9c..4ee4503 100644 --- a/src/CommandLine/Git.php +++ b/src/CommandLine/Git.php @@ -8,6 +8,21 @@ class Git extends CommandLine { protected $_repos; + public static function executeCommands($repos, $commands) + { + $res = []; + foreach ($commands as $command) { + $res[] = self::executeCommand($repos, $command); + } + return $res; + } + + public static function executeCommand($repos, $command) + { + $git = new self($repos); + return $git->executeCmd($command); + } + public function __construct($repos, $output = null, $error = true) { parent::__construct('git', $output, $error);