Fixed issue where a bare repo would cause an error output from git.