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>
This commit is contained in:
Harsh Shandilya 2020-12-01 20:54:01 +05:30 committed by GitHub
parent c7a5a97722
commit 31a11a1ebb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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. - 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. - 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 - 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
### Changed ### Changed

View File

@ -53,9 +53,8 @@ class GitCommandExecutor(
withContext(Dispatchers.IO) { withContext(Dispatchers.IO) {
val name = GitSettings.authorName.ifEmpty { "root" } val name = GitSettings.authorName.ifEmpty { "root" }
val email = GitSettings.authorEmail.ifEmpty { "localhost" } val email = GitSettings.authorEmail.ifEmpty { "localhost" }
command val identity = PersonIdent(name, email)
.setAuthor(PersonIdent(name, email)) command.setAuthor(identity).setCommitter(identity).call()
.call()
} }
} }
} }
@ -64,7 +63,7 @@ class GitCommandExecutor(
command.call() command.call()
} }
val rr = result.rebaseResult val rr = result.rebaseResult
if (rr.status === RebaseResult.Status.STOPPED) { if (rr.status == RebaseResult.Status.STOPPED) {
throw PullException.PullRebaseFailed throw PullException.PullRebaseFailed
} }
} }