mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
feat(diff): add bindings and api
This commit is contained in:
parent
2ae5751efa
commit
a7b714c2f3
47 changed files with 1789 additions and 4 deletions
|
@ -43,15 +43,27 @@ void main() {
|
|||
repo.reset(sha, GitReset.soft);
|
||||
contents = file.readAsStringSync();
|
||||
expect(contents, 'Feature edit\n');
|
||||
|
||||
final index = repo.index;
|
||||
final diff = index.diffToWorkdir();
|
||||
expect(diff.deltas, isEmpty);
|
||||
|
||||
index.free();
|
||||
});
|
||||
|
||||
test('successfully resets with soft', () {
|
||||
test('successfully resets with mixed', () {
|
||||
var contents = file.readAsStringSync();
|
||||
expect(contents, 'Feature edit\n');
|
||||
|
||||
repo.reset(sha, GitReset.mixed);
|
||||
contents = file.readAsStringSync();
|
||||
expect(contents, 'Feature edit\n');
|
||||
|
||||
final index = repo.index;
|
||||
final diff = index.diffToWorkdir();
|
||||
expect(diff.deltas.length, 1);
|
||||
|
||||
index.free();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue