mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
refactor!: return sets of git type flags instead of integers
This commit is contained in:
parent
050c0eb57a
commit
7618f944c0
12 changed files with 459 additions and 191 deletions
|
@ -29,7 +29,7 @@ void main() {
|
|||
File('${tmpDir}feature_file').writeAsStringSync('edit');
|
||||
expect(repo.status, contains('feature_file'));
|
||||
|
||||
repo.checkout(refName: 'HEAD', strategy: [GitCheckout.force]);
|
||||
repo.checkout(refName: 'HEAD', strategy: {GitCheckout.force});
|
||||
expect(repo.status, isEmpty);
|
||||
});
|
||||
|
||||
|
@ -37,7 +37,10 @@ void main() {
|
|||
File('${repo.workdir}feature_file').writeAsStringSync('edit');
|
||||
expect(repo.status, contains('feature_file'));
|
||||
|
||||
repo.checkout(strategy: [GitCheckout.force]);
|
||||
repo.checkout(strategy: {
|
||||
GitCheckout.force,
|
||||
GitCheckout.conflictStyleMerge,
|
||||
});
|
||||
expect(repo.status, isEmpty);
|
||||
});
|
||||
|
||||
|
@ -90,7 +93,12 @@ void main() {
|
|||
refName: 'refs/heads/feature',
|
||||
paths: ['another_feature_file'],
|
||||
);
|
||||
expect(repo.status, {'another_feature_file': GitStatus.indexNew.value});
|
||||
expect(
|
||||
repo.status,
|
||||
{
|
||||
'another_feature_file': {GitStatus.indexNew}
|
||||
},
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue