protected function getTagFromBranch($branch)
    {
        $git  = new GitRepository($this->input->getArgument('git-dir'));
        $tag  = trim($git->describe()->tags()->always()->execute($branch));
        $hash = trim($git->revParse()->short(false)->execute($branch));
        return $hash !== $tag ? $tag : null;
    }