mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
refactor!: use named arguments if there is more than one
This commit is contained in:
parent
ec80ad3dd4
commit
5f7fdf4bd3
66 changed files with 1920 additions and 1136 deletions
|
@ -14,7 +14,7 @@ void main() {
|
|||
setUp(() async {
|
||||
tmpDir = await setupRepo(Directory('test/assets/testrepo/'));
|
||||
repo = Repository.open(tmpDir.path);
|
||||
tree = Tree.lookup(repo, treeSHA);
|
||||
tree = Tree.lookup(repo: repo, sha: treeSHA);
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
|
@ -64,10 +64,14 @@ void main() {
|
|||
|
||||
test('successfully creates tree', () {
|
||||
final fileOid = repo.createBlob('blob content');
|
||||
final builder = TreeBuilder(repo);
|
||||
final builder = TreeBuilder(repo: repo);
|
||||
|
||||
builder.add('filename', fileOid, GitFilemode.blob);
|
||||
final newTree = Tree.lookup(repo, builder.write().sha);
|
||||
builder.add(
|
||||
filename: 'filename',
|
||||
oid: fileOid,
|
||||
filemode: GitFilemode.blob,
|
||||
);
|
||||
final newTree = Tree.lookup(repo: repo, sha: builder.write().sha);
|
||||
|
||||
final entry = newTree['filename'];
|
||||
expect(newTree.length, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue