Lines Matching refs:reference
97 * @param string reference path
101 public static function &clone_remote($repo_path, $remote, $reference = null, \action_plugin_gitbacked_editcommit $plugin = null) {
102 return GitRepo::create_new($repo_path, $plugin, $remote, true, $reference);
154 * @param string reference path
157 public static function &create_new($repo_path, \action_plugin_gitbacked_editcommit $plugin = null, $source = null, $remote_source = false, $reference = null) {
159 throw new Exception(self::handle_create_new_error($repo_path, $reference, '"'.$repo_path.'" is already a git repository', $plugin));
164 if (!is_dir($reference) || !is_dir($reference.'/.git')) {
165 throw new Exception(self::handle_create_new_error($repo_path, $reference, '"'.$reference.'" is not a git repository. Cannot use as reference.', $plugin));
166 } else if (strlen($reference)) {
167 $reference = realpath($reference);
168 $reference = "--reference $reference";
170 $repo->clone_remote($source, $reference);
362 protected static function handle_create_new_error($repo_path, $reference, $error_message, $plugin) {
364 $plugin->notify_create_new_error($repo_path, $reference, $error_message);
524 * @param string reference path
527 public function clone_remote($source, $reference) {
528 return $this->run("clone $reference $source ".$this->repo_path);
595 * Also strips out the HEAD reference (e.g. "origin/HEAD -> origin/master").