Lines Matching +full:commit +full:- +full:message
9 * @version 0.1.1-a
18 // ------------------------------------------------------------------------
72 // ------------------------------------------------------------------------
87 return $this->repo_path;
95 $this->getConf('');
99 $repo->git_path = $git_exe_path;
123 $repo->clone_from($source);
124 else $repo->run('init');
141 $this->set_repo_path($repo_path, $create_new, $_init);
160 $this->repo_path = $repo_path;
163 $this->repo_path = $repo_path;
164 if ($_init) $this->run('init');
176 $this->repo_path = $repo_path;
177 if ($_init) $this->run('init');
179 throw new Exception('cannot create repository in non-existent directory');
200 $resource = proc_open($this->git_path, $descriptorspec, $pipes);
228 $resource = proc_open($command, $descriptorspec, $pipes, $this->repo_path);
252 $path = $this->git_path;
253 return $this->run_command($path." ".$command);
267 return $this->run("add $files -v");
277 return $this->run("log ".$revision." --reverse");
285 * @param string identifyer to id the branch/commit/position
293 return $this->run($cmd);
298 …Not really an exception, if a new page has been added the exception is part of normal operation :-(
314 if ($porcelain) return $this->run("status -u --porcelain");
315 return $this->run("status");
319 return $e->getMessage();
324 $status = $this->get_status(false);
336 if(strpos($line, 'commit')===0){
339 if(!empty($commit)){
340 array_push($history, $commit);
341 unset($commit);
343 $commit['hash'] = trim(substr($line, strlen('commit')));
346 $commit['author'] = trim(substr($line, strlen('Author:')));
349 $commit['date'] = trim(substr($line, strlen('Date:')));
352 if(isset($commit['message']))
353 $commit['message'] .= trim($line);
355 $commit['message'] = trim($line);
358 if(!empty($commit)) {
359 array_push($history, $commit);
367 * Returns the names of the files that have changed in a commit
374 return $this->run("diff-tree -r --name-status --no-commit-id ".$hash);
378 * Runs a `git commit` call
380 * Accepts a commit message string
383 * @param string commit message
386 public function commit($message = "blank") { function in GitRepo
389 $fullcmd = "cd \"".$this->repo_path."\" && ".$this->git_path." ".$cmd;
390 $this->run_command($fullcmd);
393 $fullcmd = "cd \"".$this->repo_path."\" && ".$this->git_path." ".$cmd;
394 $this->run_command($fullcmd);
396 $cmd = "add . -A";
397 $fullcmd = "cd \"".$this->repo_path."\" && ".$this->git_path." ".$cmd;
398 $this->run_command($fullcmd);
400 $cmd = "commit -a -m \"".$message."\"";
401 $fullcmd = "cd \"".$this->repo_path."\" && ".$this->git_path." ".$cmd;
402 $this->run_command($fullcmd);
407 msg($e->getMessage());
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;
443 $this->run_command($fullcmd);
447 msg($e->getMessage());
462 return $this->run("clone $source ".$this->repo_path);
475 return $this->run("clean".(($dirs) ? " -d" : ""));
488 return $this->run("branch $branch");
492 * Runs a `git branch -[d|D]` call
501 return $this->run("branch ".(($force) ? '-D' : '-d')." $branch");
512 $branchArray = explode("\n", $this->run("branch"));
531 $branchArray = $this->list_branches(true);
550 return $this->run("checkout $branch");
565 if ($msg == "") return $this->run("merge $branch --no-ff");
566 return $this->run("merge $branch --no-ff -m ".$msg);
572 * Reverts the last commit, leaving the local files intact
579 return $this->run("reset --soft HEAD~1");
591 return $this->run("fetch");
604 $this->run("fetch --dry-run");
617 * Accepts the name for the tag and the message
620 * @param string $message
623 public function add_tag($tag, $message = null) argument
625 if ($message === null) {
626 $message = $tag;
628 return $this->run("tag -a $tag -m $message");
640 return $this->run($cmd);
654 return $this->run("pull $remote $branch");
664 file_put_contents($this->repo_path."/.git/description", $new);
674 return file_get_contents($this->repo_path."/.git/description");