aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-04 18:06:35 +0100
committerDanilo M. <danix@danix.xyz>2026-11-04 18:06:35 +0100
commit0208c067c6bf31d31b735c23e037bc18227f4083 (patch)
tree23371f63de9caa0082510b709db3d2e0dbda5b56
parent5915da7aaead4bce1717074c0c070fd43fd9ca40 (diff)
downloadHardenedPass-0208c067c6bf31d31b735c23e037bc18227f4083.tar.gz
HardenedPass-0208c067c6bf31d31b735c23e037bc18227f4083.zip
fix(app): name the pushed conflict branch after abort rebase
The success dialog showed a literal conflicting-<branch>-... instead of the branch BreakOutOfDetached pushed. It now reads the newest local conflicting-<branch>-<millis> ref, which is the one just created. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--app/src/main/java/app/passwordstore/ui/settings/GitConfigScreen.kt13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/src/main/java/app/passwordstore/ui/settings/GitConfigScreen.kt b/app/src/main/java/app/passwordstore/ui/settings/GitConfigScreen.kt
index d8001191..872fcd8b 100644
--- a/app/src/main/java/app/passwordstore/ui/settings/GitConfigScreen.kt
+++ b/app/src/main/java/app/passwordstore/ui/settings/GitConfigScreen.kt
@@ -311,14 +311,15 @@ fun GitConfigDestination(
}
if (done == GitOp.BREAK_OUT_OF_DETACHED) {
val aborted = viewModel.abortedBranch.orEmpty()
+ // BreakOutOfDetached names the pushed branch conflicting-<branch>-<millis>: the newest one.
+ val pushed =
+ PasswordRepository.repository
+ ?.refDatabase
+ ?.getRefsByPrefix("refs/heads/conflicting-$aborted-")
+ ?.maxOfOrNull { it.name.removePrefix("refs/heads/") } ?: "conflicting-$aborted-..."
SetupDialog(
title = stringResource(R.string.git_abort_and_push_title),
- text =
- stringResource(
- R.string.git_break_out_of_detached_success,
- aborted,
- "conflicting-$aborted-...",
- ),
+ text = stringResource(R.string.git_break_out_of_detached_success, aborted, pushed),
confirm = stringResource(R.string.dialog_ok),
onConfirm = onClose,
onDismiss = onClose,