cLib: Allow empty commits

Our empty commit check was faulty. If we had changes in the index
(deleted files), it would still give an entry count of 0;

Not sure how to fix this.

Also bumping to a new version, as without this note deletion is broken.
This commit is contained in:
Vishesh Handa
2019-05-29 16:47:14 +02:00
parent 457db382cf
commit 0cf647e1b6
2 changed files with 5 additions and 1 deletions

View File

@ -180,12 +180,16 @@ int gj_git_commit(const char *git_base_path, const char *author_name,
if (err < 0)
goto cleanup;
/*
FIXME: This returns 0 when a file is set to be removed
How do we figure out when the index is empty?
int numOps = git_index_entrycount(index);
if (numOps == 0)
{
err = GJ_ERR_EMPTY_COMMIT;
goto cleanup;
}
*/
err = git_signature_now(&sig, author_name, author_email);
if (err < 0)

View File

@ -1,6 +1,6 @@
name: journal
description: A Journaling App Built on top of Git
version: 1.1.2+10
version: 1.1.3+10
dependencies:
flutter: