In the latest updates the way to do it is:
TreeChanges changes = repo.Diff.Compare<TreeChanges>(tree1, tree2);