mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor(reference): remove duplication
This commit is contained in:
parent
a474f06917
commit
1f0201d259
6 changed files with 147 additions and 208 deletions
|
@ -4,7 +4,10 @@ import 'package:libgit2dart/libgit2dart.dart';
|
|||
|
||||
void main() {
|
||||
final repo = Repository.open(Directory.current.path);
|
||||
final ref = repo.getReference('refs/heads/master');
|
||||
|
||||
print('Repository references: ${Reference.list(repo)}');
|
||||
|
||||
final ref = Reference.get(repo, '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