Fix MissingObjectException in from RevisionParser.parse
Revision.peel was failing to distinguish between
MissingObjectExceptions due to the root object missing and those due
to an object pointed to by a tag missing. In RevisionParser, we were
sometimes passing nonexistent SHAs that were nonetheless valid
according to repo.resolve() to this method. In that case, the root
object being missing is ok (it should parse as null), but a tagged
object being missing is more serious and should throw.
Separate these cases out by requiring callers to validate the SHA
before passing to Revision.peel.
Change-Id: I1d488a087bd3284f990dcb1839bdebec378a8d18
4 files changed