From 0208c067c6bf31d31b735c23e037bc18227f4083 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 4 Nov 2026 18:06:35 +0100 Subject: fix(app): name the pushed conflict branch after abort rebase The success dialog showed a literal conflicting--... instead of the branch BreakOutOfDetached pushed. It now reads the newest local conflicting-- ref, which is the one just created. Co-Authored-By: Claude Opus 5.5 --- .../java/app/passwordstore/ui/settings/GitConfigScreen.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'app/src/main/java') 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--: 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, -- cgit v1.2.3