Fix IncorrectObjectTypeException on initial commit
On the initial commit of a project, "a" is the empty tree,
not a commit object, in order to show all initial files as
new files. To cast it into a RevTree we must use parseTree()
and not parseCommit().getTree(). For all subsequent changes, "a"
will be a commit and parseTree() will automatically deference to
the commit's root tree.
Bug: issue 442
Change-Id: I9302b6e3d6e9117159e32e96119b6563ac8e26c1
Signed-off-by: Shawn O. Pearce <sop@google.com>
1 file changed