aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Storage/GitRepo.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Storage/GitRepo.php')
-rw-r--r--Zotlabs/Storage/GitRepo.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/Zotlabs/Storage/GitRepo.php b/Zotlabs/Storage/GitRepo.php
index f4a129bb3..306abc0ba 100644
--- a/Zotlabs/Storage/GitRepo.php
+++ b/Zotlabs/Storage/GitRepo.php
@@ -127,6 +127,15 @@ class GitRepo {
$repo['logs'] = $git->log(array('limit' => 50));
return $repo;
}
+
+ // Commit changes to the repo. Default is to stage all changes and commit everything.
+ public function commit($msg, $options = array()) {
+ try {
+ return $this->git->commit($msg, $options);
+ } catch (\PHPGit\Exception\GitException $ex) {
+ return false;
+ }
+ }
public static function isValidGitRepoURL($url) {
if (validate_url($url) && strrpos(parse_url($url, PHP_URL_PATH), '.')) {