From 57f1c65fdfbac9acd5e4fce30a6d5ef131fa9728 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 14 Aug 2020 01:46:47 +0530 Subject: Restore workaround for preventing empty commits (#1019) * Revert "Add symlink support to JGit (#1016)" This reverts commit 5032696cec9da86c2ad97b9931e8d85feb18da0c. * Restore workaround for empty commits and document commands Signed-off-by: Harsh Shandilya * Update app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt --- app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt') diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt b/app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt index da6be410..96bf1b7e 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt +++ b/app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt @@ -111,7 +111,11 @@ suspend fun FragmentActivity.commitChange( } object : GitOperation(getRepositoryDirectory(), this@commitChange) { override val commands = arrayOf( + // Stage all files git.add().addFilepattern("."), + // Populate the changed files count + git.status(), + // Commit everything! If anything changed, that is. git.commit().setAll(true).setMessage(message), ) -- cgit v1.2.3