public function getCommit($short = true, $path = null)
    {
        $short = $short ? 'h' : 'H';
        $path = $this->resolvePath($path);

        $process = new Process("git log --pretty=\"%$short\" -n1 HEAD", $path);

        if (0 === $process->run()) {
            return trim($process->getOutput());
        }

        throw GitException::process($process);
    }