Repo.rev_parse: Handle <tag>^{commit} correctly by flichtenheld · Pull Request #1996 · gitpython-developers/GitPython
# ref^0 returns commit being pointed to, same with ref~0, and ^{} # ref^0 returns commit being pointed to, same with ref~0, ^{}, and ^{commit} tag = rev_parse("0.1.4") for token in ("~0", "^0", "^{}"): for token in ("~0", "^0", "^{}", "^{commit}"): self.assertEqual(tag.object, rev_parse("0.1.4%s" % token)) # END handle multiple tokens