/** * Commit. * * @param $output */ protected function commit(SyncOutputContract $output) { if ($this->git->hasChanges()) { $commit = $this->git->commit(); // Display the output if (isset($commit['name']) && isset($commit['data'])) { $output->out($commit['name'], $commit['data']); } } // Free some RAM unset($commit); }
/** * Has changes? * * @return bool */ public function hasChanges() { return $this->git->hasChanges(); }