langfield / ki

version control for Anki collections
https://langfield.github.io/ki/
GNU Affero General Public License v3.0
70 stars 3 forks source link

Libgit throws `error: '_media/' does not have a commit checked out` when `collection.media/` is empty #123

Closed langfield closed 1 year ago

langfield commented 1 year ago

The _media/ subdirectory should probably be a git submodule.

Cloning media from Anki media directory '/home/user/proving-grounds/multifield/collection.media/'...
parts: ["Default"]
Committing contents to repository...
Ki-exe: git error [cwd: /home/user/proving-grounds/dd/][exec: add--.][exit: 128][msg: add] stdout:  stderr: error: '_media/' does not have a commit checked out
fatal: adding files failed

CallStack (from HasCallStack):
  error, called at ./Lib/Git/Type.hs:134:9 in libgit-0.3.1-6JK9y0TaDRvKrW6zerxiJi:Lib.Git.Type
langfield commented 1 year ago

This has been fixed by using --allow-empty when invoking git commit in collection.media/.