From 521a1757ab487096c765957ccc16db183c536c7d Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 10 Dec 2018 06:40:42 +0000 Subject: [PATCH] added GitModel::createRepo() for experiment --- codepot/src/codepot/models/gitmodel.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/codepot/src/codepot/models/gitmodel.php b/codepot/src/codepot/models/gitmodel.php index ff41c266..6a76994a 100644 --- a/codepot/src/codepot/models/gitmodel.php +++ b/codepot/src/codepot/models/gitmodel.php @@ -152,6 +152,17 @@ class GitModel extends CodeRepoModel { return FALSE; } + + static function createRepo ($projectid, $repodir, $cfgdir, $api) + { + $projdir = "{$repodir}/{$projectid}"; + if (@git_repository_init($projdir, TRUE) === FALSE) return FALSE; + } + + static function deleteRepo ($projectid, $repodir) + { + return $this->deleteDirectory("{$repodir}/{$projectid}"); + } } ?>