Lines Matching refs:repo_path
40 public static function &create($repo_path, $source = null) { argument
41 return GitRepo::create_new($repo_path, $source);
53 public static function open($repo_path) { argument
54 return new GitRepo($repo_path);
84 protected $repo_path = null; variable in GitRepo
87 return $this->repo_path;
117 public static function &create_new($repo_path, $source = null) { argument
118 if (is_dir($repo_path) && file_exists($repo_path."/.git") && is_dir($repo_path."/.git")) {
119 throw new Exception('"'.$repo_path.'" is already a git repository');
121 $repo = new self($repo_path, true, false);
139 public function __construct($repo_path = null, $create_new = false, $_init = true) { argument
140 if (is_string($repo_path))
141 $this->set_repo_path($repo_path, $create_new, $_init);
154 public function set_repo_path($repo_path, $create_new = false, $_init = true) { argument
155 if (is_string($repo_path)) {
156 if ($new_path = realpath($repo_path)) {
157 $repo_path = $new_path;
158 if (is_dir($repo_path)) {
159 if (file_exists($repo_path."/.git") && is_dir($repo_path."/.git")) {
160 $this->repo_path = $repo_path;
163 $this->repo_path = $repo_path;
166 throw new Exception('"'.$repo_path.'" is not a git repository');
170 throw new Exception('"'.$repo_path.'" is not a directory');
174 if ($parent = realpath(dirname($repo_path))) {
175 mkdir($repo_path);
176 $this->repo_path = $repo_path;
182 throw new Exception('"'.$repo_path.'" does not exist');
228 $resource = proc_open($command, $descriptorspec, $pipes, $this->repo_path);
389 $fullcmd = "cd \"".$this->repo_path."\" && ".$this->git_path." ".$cmd;
393 $fullcmd = "cd \"".$this->repo_path."\" && ".$this->git_path." ".$cmd;
397 $fullcmd = "cd \"".$this->repo_path."\" && ".$this->git_path." ".$cmd;
401 $fullcmd = "cd \"".$this->repo_path."\" && ".$this->git_path." ".$cmd;
423 return $this->run("clone --local ".$this->repo_path." $target");
440 $cmd = "clone -q $source \"".$this->repo_path."\"";
441 $fullcmd = "cd \"".$this->repo_path."\" && ".$this->git_path." ".$cmd;
462 return $this->run("clone $source ".$this->repo_path);
664 file_put_contents($this->repo_path."/.git/description", $new);
674 return file_get_contents($this->repo_path."/.git/description");