public add ( string $filepattern, array $options = [] ) : |
||
$filepattern | string | Files to add content from. Fileglobs (e.g. *.c) can be given to add all matching files. Also a leading directory name (e.g. dir to add dir/file1 and dir/file2) can be given to add all files in the directory, recursively. |
$options | array | An optional array of command line options. |
return |
public function add($filepattern, array $options = array())
{
$args = array('add', $filepattern, $options);
return $this->run($args);
}
public function execute(GitWorkingCopy $git, LocalPackage $package) { $git->add('.'); $this->dispatchEvent(StepsEvents::GIT_ADDED, new GitEventMade($git)); $git->commit($this->getCommitMessage($git)); $this->dispatchEvent(StepsEvents::GIT_COMMITTED, new GitEventMade($git)); $git->push('origin', $package->getLocalBranch(), array('f' => true)); $this->dispatchEvent(StepsEvents::GIT_PUSHED, new GitEventMade($git)); return null === $git->getStatus() ? true : false; }