feat(reference): add base bindings and api

This commit is contained in:
Aleksey Kulikov 2021-08-03 21:19:27 +03:00
parent 145af3054d
commit 5f60a693d3
8 changed files with 413 additions and 6 deletions

View file

@ -0,0 +1,14 @@
import 'dart:io';
import 'package:libgit2dart/libgit2dart.dart';
void main() {
final repo = Repository.open(Directory.current.path);
final ref = Reference.lookup(repo, 'refs/heads/master');
print('Reference SHA hex: ${ref.target}');
print('Is reference a local branch: ${ref.isBranch}');
print('Reference full name: ${ref.name}');
ref.free();
}