feat(reference): add more bindings and API methods

This commit is contained in:
Aleksey Kulikov 2021-12-22 19:46:26 +03:00
parent fb4694cf06
commit fa077856e5
3 changed files with 55 additions and 0 deletions

View file

@ -128,6 +128,19 @@ void main() {
ref.free();
});
test('duplicates existing reference', () {
expect(repo.references.length, 6);
final ref = repo.lookupReference('refs/heads/master');
final duplicate = ref.duplicate();
expect(repo.references.length, 6);
expect(duplicate, equals(ref));
duplicate.free();
ref.free();
});
group('create direct', () {
test('successfully creates with Oid as target', () {
final ref = repo.lookupReference('refs/heads/master');