mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-06-23 09:19:26 -04:00
feat(repository): add ability to lookup different types of git objects with []
This commit is contained in:
parent
f19a34a768
commit
2cf974c624
14 changed files with 124 additions and 67 deletions
|
@ -20,7 +20,7 @@ void main() {
|
|||
to: await Directory(tmpDir).create(),
|
||||
);
|
||||
repo = Repository.open(tmpDir);
|
||||
tree = Tree.lookup(repo, Oid.fromSHA(repo, treeSHA));
|
||||
tree = Tree.lookup(repo, treeSHA);
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
|
@ -73,7 +73,7 @@ void main() {
|
|||
final builder = TreeBuilder(repo);
|
||||
|
||||
builder.add('filename', fileOid, GitFilemode.blob);
|
||||
final newTree = Tree.lookup(repo, builder.write());
|
||||
final newTree = Tree.lookup(repo, builder.write().sha);
|
||||
|
||||
final entry = newTree['filename'];
|
||||
expect(newTree.length, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue