mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor!: change api entry points
This commit is contained in:
parent
06b44597d5
commit
5feb12fdaa
9 changed files with 411 additions and 457 deletions
|
@ -5,9 +5,9 @@ import 'package:libgit2dart/libgit2dart.dart';
|
|||
void main() {
|
||||
final repo = Repository.open(Directory.current.path);
|
||||
|
||||
print('Repository references: ${Reference.list(repo)}');
|
||||
print('Repository references: ${repo.references.list()}');
|
||||
|
||||
final ref = Reference.get(repo, 'refs/heads/master');
|
||||
final ref = repo.references['refs/heads/master'];
|
||||
|
||||
print('Reference SHA hex: ${ref.target.sha}');
|
||||
print('Is reference a local branch: ${ref.isBranch}');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue