Add @Bug(23299) to one of the tests
Fix test failures due to misunderstood method argument contracts

The revParse method always decodes the tag SHA1 to a commit.

The getHeadRev method decodes the tag SHA1 to a commit if it is
prefixed with refs/tags