feat(diff): return list of patches

This commit is contained in:
Aleksey Kulikov 2021-09-20 11:02:44 +03:00
parent 677457279d
commit 6845286af2
2 changed files with 25 additions and 0 deletions

View file

@ -281,6 +281,21 @@ index e69de29..c217c63 100644
index.free();
});
test('returns deltas', () {
final index = repo.index;
final diff = index.diffToWorkdir();
final patches = diff.patches;
expect(patches.length, 8);
expect(patches.first.delta.status, GitDelta.deleted);
for (var p in patches) {
p.free();
}
diff.free();
index.free();
});
test('returns stats', () {
final index = repo.index;
final diff = index.diffToWorkdir();