Improve failure message in getHeadRev test for tagged commit