Lines Matching +full:commit +full:- +full:message

70                         $reference = "--reference $reference";
72 $repo->cloneRemote($source, $reference);
74 $repo->cloneFrom($source);
77 $repo->run('init');
100 $this->plugin = $plugin;
102 $this->setRepoPath($repo_path, $create_new, $_init);
125 $this->repo_path = $repo_path;
126 $this->bare = false;
131 $this->repo_path = $repo_path;
132 $this->bare = true;
135 $this->repo_path = $repo_path;
137 $this->run('init');
140 throw new \Exception($this->handleRepoPathError(
146 throw new \Exception($this->handleRepoPathError(
154 $this->repo_path = $repo_path;
155 if ($_init) $this->run('init');
157 throw new \Exception($this->handleRepoPathError(
159 'cannot create repository in non-existent directory'
163 throw new \Exception($this->handleRepoPathError(
179 return ($this->bare) ? $this->repo_path : $this->repo_path . "/.git";
215 //dbglog("Git->runCommand(command=[".$command."])");
218 $cwd = $this->repo_path;
219 //dbglog("GitBacked - cwd: [".$cwd."]");
220 /* Provide any $this->envopts via putenv
228 foreach ($this->envopts as $k => $v) {
242 //dbglog("GitBacked - stderr: [".$stderr."]");
243 … // Remove a probable password from the Git URL, if the URL is contained in the error message
249 //dbglog("GitBacked - error_message: [".$error_message."]");
250 throw new \Exception($this->handleCommandError(
251 $this->repo_path,
258 $this->handleCommandSuccess($this->repo_path, $cwd, $command);
275 return $this->runCommand(Git::getBin() . " " . $command);
283 * @param string error message
284 * @return string error message
289 $plugin->notifyCreateNewError($repo_path, $reference, $error_message);
299 * @param string error message
300 * @return string error message
304 if ($this->plugin instanceof \action_plugin_gitbacked_editcommit) {
305 $this->plugin->notifyRepoPathError($repo_path, $error_message);
318 * @param string error message
319 * @return string error message
323 if ($this->plugin instanceof \action_plugin_gitbacked_editcommit) {
324 $this->plugin->notifyCommandError($repo_path, $cwd, $command, $status, $error_message);
340 if ($this->plugin instanceof \action_plugin_gitbacked_editcommit) {
341 $this->plugin->notifyCommandSuccess($repo_path, $cwd, $command);
356 $msg = $this->run("status");
377 return $this->run("add $files -v");
387 * @param Boolean use the --cached flag?
395 return $this->run("rm " . ($cached ? '--cached ' : '') . $files);
400 * Runs a `git commit` call
402 * Accepts a commit message string
405 * @param string commit message
406 * @param boolean should all files be committed automatically (-a flag)
409 public function commit($message = "", $commit_all = true) function in woolfg\\dokuwiki\\plugin\\gitbacked\\GitRepo
411 $flags = $commit_all ? '-av' : '-v';
412 $msgfile = GitBackedUtil::createMessageFile($message);
414 return $this->run("commit --allow-empty " . $flags . " --file=" . $msgfile);
432 return $this->run("clone --local " . $this->repo_path . " $target");
447 return $this->run("clone --local $source " . $this->repo_path);
463 return $this->run("clone $reference $source " . $this->repo_path);
478 return $this->run("clean" . (($force) ? " -f" : "") . (($dirs) ? " -d" : ""));
492 return $this->run("branch $branch");
496 * Runs a `git branch -[d|D]` call
506 return $this->run("branch " . (($force) ? '-D' : '-d') . " $branch");
518 $branchArray = explode("\n", $this->run("branch"));
532 * Lists remote branches (using `git branch -r`).
534 * Also strips out the HEAD reference (e.g. "origin/HEAD -> origin/master").
541 $branchArray = explode("\n", $this->run("branch -r"));
544 if ($branch == "" || strpos($branch, 'HEAD -> ') !== false) {
560 $branchArray = $this->listBranches(true);
581 return $this->run("checkout $branch");
596 return $this->run("merge $branch --no-ff");
608 return $this->run("fetch");
614 * Accepts the name for the tag and the message
617 * @param string $message
620 public function addTag($tag, $message = null) argument
622 if ($message === null) {
623 $message = $tag;
625 $msgfile = GitBackedUtil::createMessageFile($message);
627 return $this->run("tag -a $tag --file=" . $msgfile);
644 $tagArray = explode("\n", $this->run("tag -l $pattern"));
666 return $this->run("push --tags $remote $branch");
680 return $this->run("pull $remote $branch");
692 return $this->run('log');
694 return $this->run('log --pretty=format:"' . $format . '"');
705 $path = $this->gitDirectoryPath();
716 $path = $this->gitDirectoryPath();
728 $this->envopts[$key] = $value;