public static function create(Repository $repository, string $message, bool $stageAll = false, $author = null)
    {
        $repository->getCaller()->execute(MainCommand::getInstance($repository)->commit($message, $stageAll, $author));

        return $repository->getCommit();
    }
public static function create(Repository $repository, string $message, bool $stageAll = false, $author = null)
    {
        $repository->getCaller()->execute(MainCommand::getInstance($repository)->commit($message, $stageAll, $author));

        return $repository->getCommit();
    }
public static function create ( Repository $ repository , string $ message , bool $ stageAll = false , $ author = null ) { $ repository -> getCaller ( ) -> execute ( MainCommand :: getInstance ( $ repository ) -> commit ( $ message , $ stageAll , $ author ) ) ; return $ repository -> getCommit ( ) ; }
factory method to create a commit

@param Repository    $repository repository instance
@param string        $message    commit message
@param bool          $stageAll   automatically stage the dirty working tree. Alternatively call stage() on the repo
@param string|Author $author     override the author for this commit

@throws \RuntimeException
@throws \Symfony\Component\Process\Exception\LogicException
@throws \InvalidArgumentException
@throws \Symfony\Component\Process\Exception\InvalidArgumentException
@throws \Symfony\Component\Process\Exception\RuntimeException
@return Commit
factory method to create a commit