gitlib icon indicating copy to clipboard operation
gitlib copied to clipboard

`repoAutoCreate = True` throws `GitException`: `"Could not find repository from /..."` when empty dir exists at `repoPath`

Open Atemu opened this issue 1 year ago • 0 comments

I tried to create a repo in a temp dir auto-generated by withSystemTempDirectory but it'd inexplicably throw a git exception.

After a bit of debugging I found out that it fails only when the given repoPath is empty; if it doesn't exist at all, it'll create the directory and repo.

I don't know how libgit works but this is contrary to how the git CLI works; you can git init an empty directory just fine.

Atemu avatar Apr 16 '24 16:04 Atemu