Skip to content

Commit 362678e

Browse files
committed
Mention which command is continued in PromptToContinueRebase
When you are in the middle of a rebase, and you cherry-pick a commit which conflicts, it helps to be clear on whether you are prompted to continue the cherry-pick or the rebase.
1 parent 5425257 commit 362678e

23 files changed

+27
-25
lines changed

pkg/gui/controllers/helpers/merge_and_rebase_helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ func (self *MergeAndRebaseHelper) AbortMergeOrRebaseWithConfirm() error {
226226
func (self *MergeAndRebaseHelper) PromptToContinueRebase() error {
227227
self.c.Confirm(types.ConfirmOpts{
228228
Title: self.c.Tr.Continue,
229-
Prompt: self.c.Tr.ConflictsResolved,
229+
Prompt: fmt.Sprintf(self.c.Tr.ConflictsResolved, self.c.Git().Status.WorkingTreeState().CommandName()),
230230
HandleConfirm: func() error {
231231
// By the time we get here, we might have unstaged changes again,
232232
// e.g. if the user had to fix build errors after resolving the

pkg/i18n/english.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ func EnglishTranslationSet() *TranslationSet {
13911391
SecondaryTitle: "Secondary",
13921392
ReflogCommitsTitle: "Reflog",
13931393
GlobalTitle: "Global keybindings",
1394-
ConflictsResolved: "All merge conflicts resolved. Continue?",
1394+
ConflictsResolved: "All merge conflicts resolved. Continue the %s?",
13951395
Continue: "Continue",
13961396
UnstagedFilesAfterConflictsResolved: "Files have been modified since conflicts were resolved. Auto-stage them and continue?",
13971397
Keybindings: "Keybindings",

pkg/integration/components/common.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package components
22

3+
import "fmt"
4+
35
// for running common actions
46
type Common struct {
57
t *TestDriver
@@ -43,10 +45,10 @@ func (self *Common) AcknowledgeConflicts() {
4345
Confirm()
4446
}
4547

46-
func (self *Common) ContinueOnConflictsResolved() {
48+
func (self *Common) ContinueOnConflictsResolved(command string) {
4749
self.t.ExpectPopup().Confirmation().
4850
Title(Equals("Continue")).
49-
Content(Contains("All merge conflicts resolved. Continue?")).
51+
Content(Contains(fmt.Sprintf("All merge conflicts resolved. Continue the %s?", command))).
5052
Confirm()
5153
}
5254

pkg/integration/tests/branch/rebase.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
4848

4949
t.Views().Information().Content(Contains("Rebasing"))
5050

51-
t.Common().ContinueOnConflictsResolved()
51+
t.Common().ContinueOnConflictsResolved("rebase")
5252

5353
t.Views().Information().Content(DoesNotContain("Rebasing"))
5454

pkg/integration/tests/branch/rebase_and_drop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
7777
IsFocused().
7878
PressPrimaryAction()
7979

80-
t.Common().ContinueOnConflictsResolved()
80+
t.Common().ContinueOnConflictsResolved("rebase")
8181

8282
t.Views().Information().Content(DoesNotContain("Rebasing"))
8383

pkg/integration/tests/branch/rebase_conflicts_fix_build_errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var RebaseConflictsFixBuildErrors = NewIntegrationTest(NewIntegrationTestArgs{
5151

5252
popup := t.ExpectPopup().Confirmation().
5353
Title(Equals("Continue")).
54-
Content(Contains("All merge conflicts resolved. Continue?"))
54+
Content(Contains("All merge conflicts resolved. Continue the rebase?"))
5555

5656
// While the popup is showing, fix some build errors
5757
t.Shell().UpdateFile("file", "make it compile again")

pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
6969
SelectNextItem().
7070
PressPrimaryAction()
7171

72-
t.Common().ContinueOnConflictsResolved()
72+
t.Common().ContinueOnConflictsResolved("rebase")
7373

7474
t.Views().Files().IsEmpty()
7575

pkg/integration/tests/commit/shared.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func doTheRebaseForAmendTests(t *TestDriver, keys config.KeybindingConfig) {
6161

6262
t.ExpectPopup().Confirmation().
6363
Title(Equals("Continue")).
64-
Content(Contains("All merge conflicts resolved. Continue?")).
64+
Content(Contains("All merge conflicts resolved. Continue the rebase?")).
6565
Cancel()
6666
}
6767

pkg/integration/tests/conflicts/resolve_externally.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var ResolveExternally = NewIntegrationTest(NewIntegrationTestArgs{
2525
}).
2626
Press(keys.Universal.Refresh)
2727

28-
t.Common().ContinueOnConflictsResolved()
28+
t.Common().ContinueOnConflictsResolved("merge")
2929

3030
t.Views().Files().
3131
IsEmpty()

pkg/integration/tests/conflicts/resolve_multiple_files.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ var ResolveMultipleFiles = NewIntegrationTest(NewIntegrationTestArgs{
5151
).
5252
PressPrimaryAction()
5353

54-
t.Common().ContinueOnConflictsResolved()
54+
t.Common().ContinueOnConflictsResolved("merge")
5555
},
5656
})

0 commit comments

Comments
 (0)