Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 31a11a1

Browse files
authored
GitCommandExecutor: make committer match author (#1226)
* GitCommandExecutor: make committer match author Signed-off-by: Harsh Shandilya <[email protected]> * Add changelog entry Signed-off-by: Harsh Shandilya <[email protected]>
1 parent c7a5a97 commit 31a11a1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
1414
- If multiple username fields exist in the password, we now ensure the later ones are not dropped from extra content.
1515
- Icons in Autofill suggestions are no longer black on almost black in dark mode.
1616
- Decrypt screen would stay in memory infinitely, allowing passwords to be seen without re-auth
17+
- Git commits in the store would wrongly use the 'default' committer as opposed to the user's configured one
1718

1819
### Changed
1920

app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ class GitCommandExecutor(
5353
withContext(Dispatchers.IO) {
5454
val name = GitSettings.authorName.ifEmpty { "root" }
5555
val email = GitSettings.authorEmail.ifEmpty { "localhost" }
56-
command
57-
.setAuthor(PersonIdent(name, email))
58-
.call()
56+
val identity = PersonIdent(name, email)
57+
command.setAuthor(identity).setCommitter(identity).call()
5958
}
6059
}
6160
}
@@ -64,7 +63,7 @@ class GitCommandExecutor(
6463
command.call()
6564
}
6665
val rr = result.rebaseResult
67-
if (rr.status === RebaseResult.Status.STOPPED) {
66+
if (rr.status == RebaseResult.Status.STOPPED) {
6867
throw PullException.PullRebaseFailed
6968
}
7069
}

0 commit comments

Comments
 (0)