diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2020-12-01 20:54:01 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2020-12-21 20:29:33 +0530 |
commit | 575e5f24e43f9522c925f66fd49fd1e7867cb227 (patch) | |
tree | 892b328e125526c4fd8e2b91865d684c46510f3d | |
parent | b0afe8adaa4c8043798120f8638fe95153572857 (diff) |
GitCommandExecutor: make committer match author (#1226)
* GitCommandExecutor: make committer match author
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Add changelog entry
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
(cherry picked from commit 31a11a1ebb54ec88d13004c6b4669d7501724909)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index d10fb572..c40acf6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. - If multiple username fields exist in the password, we now ensure the later ones are not dropped from extra content. - Icons in Autofill suggestions are no longer black on almost black in dark mode. - Decrypt screen would stay in memory infinitely, allowing passwords to be seen without re-auth +- Git commits in the store would wrongly use the 'default' committer as opposed to the user's configured one ## [1.13.1] - 2020-10-23 diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt b/app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt index ef584cf7..a86e8c54 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt @@ -53,9 +53,8 @@ class GitCommandExecutor( withContext(Dispatchers.IO) { val name = GitSettings.authorName.ifEmpty { "root" } val email = GitSettings.authorEmail.ifEmpty { "localhost" } - command - .setAuthor(PersonIdent(name, email)) - .call() + val identity = PersonIdent(name, email) + command.setAuthor(identity).setCommitter(identity).call() } } } @@ -64,7 +63,7 @@ class GitCommandExecutor( command.call() } val rr = result.rebaseResult - if (rr.status === RebaseResult.Status.STOPPED) { + if (rr.status == RebaseResult.Status.STOPPED) { throw PullException.PullRebaseFailed } } |