mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
feat: add more toString overrides for debugging
This commit is contained in:
parent
beed516c89
commit
9f346c99f7
26 changed files with 175 additions and 18 deletions
|
@ -220,6 +220,9 @@ class Index with IterableMixin<IndexEntry> {
|
|||
/// Releases memory allocated for index object.
|
||||
void free() => bindings.free(_indexPointer);
|
||||
|
||||
@override
|
||||
String toString() => 'Index{hasConflicts: $hasConflicts}';
|
||||
|
||||
@override
|
||||
Iterator<IndexEntry> get iterator => _IndexIterator(_indexPointer);
|
||||
}
|
||||
|
@ -261,7 +264,7 @@ class IndexEntry {
|
|||
|
||||
@override
|
||||
String toString() {
|
||||
return 'IndexEntry{path: $path, sha: $sha}';
|
||||
return 'IndexEntry{oid: $oid, path: $path, mode: $mode}';
|
||||
}
|
||||
|
||||
String _oidToHex(git_oid oid) {
|
||||
|
@ -306,7 +309,7 @@ class ConflictEntry {
|
|||
|
||||
@override
|
||||
String toString() =>
|
||||
'ConflictEntry{ancestor: $ancestor, our: $our, their: $their}';
|
||||
'ConflictEntry{ancestor: $ancestor, our: $our, their: $their, path: $_path}';
|
||||
}
|
||||
|
||||
class _IndexIterator implements Iterator<IndexEntry> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue