refactor(commit)!: return Tree object instead of Oid for tree getter

This commit is contained in:
Aleksey Kulikov 2021-09-10 12:16:26 +03:00
parent 458c0bdc71
commit 050c0eb57a
5 changed files with 20 additions and 15 deletions

View file

@ -183,9 +183,9 @@ void main() {
final baseCommit =
repo[repo.mergeBase(ourCommit.id.sha, theirCommit.id.sha).sha]
as Commit;
final theirTree = repo[theirCommit.tree.sha] as Tree;
final ourTree = repo[ourCommit.tree.sha] as Tree;
final ancestorTree = repo[baseCommit.tree.sha] as Tree;
final theirTree = theirCommit.tree;
final ourTree = ourCommit.tree;
final ancestorTree = baseCommit.tree;
final mergeIndex = repo.mergeTrees(
ancestorTree: ancestorTree,
@ -221,9 +221,9 @@ void main() {
final baseCommit =
repo[repo.mergeBase(ourCommit.id.sha, theirCommit.id.sha).sha]
as Commit;
final theirTree = repo[theirCommit.tree.sha] as Tree;
final ourTree = repo[ourCommit.tree.sha] as Tree;
final ancestorTree = repo[baseCommit.tree.sha] as Tree;
final theirTree = theirCommit.tree;
final ourTree = ourCommit.tree;
final ancestorTree = baseCommit.tree;
final mergeIndex = repo.mergeTrees(
ancestorTree: ancestorTree,