feat: add more toString overrides for debugging

This commit is contained in:
Aleksey Kulikov 2021-10-13 19:23:34 +03:00
parent beed516c89
commit 9f346c99f7
26 changed files with 175 additions and 18 deletions

View file

@ -308,6 +308,14 @@ class Repository {
/// Releases memory allocated for repository object.
void free() => bindings.free(_repoPointer);
@override
String toString() {
return 'Repository{path: $path, commonDir: $commonDir, namespace: $namespace, '
'isBare: $isBare, isEmpty: $isEmpty, isHeadDetached: $isHeadDetached, '
'isBranchUnborn: $isBranchUnborn, isShallow: $isShallow, isWorktree: $isWorktree, '
'state: $state, workdir: $workdir}';
}
/// Returns the configuration file for this repository.
///
/// If a configuration file has not been set, the default config set for the repository