feat(index): add ability to pass options to addAll(...) API method

This commit is contained in:
Aleksey Kulikov 2022-06-17 14:45:06 +03:00
parent d113af44b5
commit 0113263c47
5 changed files with 47 additions and 4 deletions

View file

@ -175,7 +175,10 @@ void main() {
group('addAll()', () {
test('adds with provided pathspec', () {
index.clear();
index.addAll(['file', 'feature_file']);
index.addAll(
['file', 'feature_file'],
flags: {GitIndexAddOption.checkPathspec, GitIndexAddOption.force},
);
expect(index.length, 2);
expect(index['file'].oid.sha, fileSha);