mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
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:
@ -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)
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user