diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2020-12-01 20:54:01 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 20:54:01 +0530 |
commit | 31a11a1ebb54ec88d13004c6b4669d7501724909 (patch) | |
tree | c662c242e9b35defe9e2ae383727a109c661d5e8 /app/src/main | |
parent | c7a5a97722136468711409ddb469ce71cfb8305f (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>
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt | 7 |
1 files changed, 3 insertions, 4 deletions
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 } } |