public function getCommitMessage($file = null)
    {
        if ($file) {
            $hash = null;
            $message = file_get_contents($file);
        } else {
            list($hash, $message) = explode(PHP_EOL, $this->getLastCommitMessage(), 2);
        }

        return new CommitMessage($message, $hash);
    }