feat(repository): add ability to discover repository from sub directories

This commit is contained in:
Aleksey Kulikov 2021-08-21 14:20:57 +03:00
parent da8494d3e2
commit 543ebff223
4 changed files with 53 additions and 1 deletions

View file

@ -69,7 +69,7 @@ Pointer<git_config> openDefault() {
///
/// Throws an error if file has not been found.
String findGlobal() {
final out = calloc<git_buf>(2);
final out = calloc<git_buf>(sizeOf<git_buf>());
final error = libgit2.git_config_find_global(out);
final path = out.ref.ptr.cast<Utf8>().toDartString();
calloc.free(out);