correctly identify git repo when all changes are staged