mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-10 20:05:50 +02:00
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.
This commit is contained in:
parent
542525743c
commit
362678e2ef
23 changed files with 27 additions and 25 deletions
|
@ -226,7 +226,7 @@ func (self *MergeAndRebaseHelper) AbortMergeOrRebaseWithConfirm() error {
|
|||
func (self *MergeAndRebaseHelper) PromptToContinueRebase() error {
|
||||
self.c.Confirm(types.ConfirmOpts{
|
||||
Title: self.c.Tr.Continue,
|
||||
Prompt: self.c.Tr.ConflictsResolved,
|
||||
Prompt: fmt.Sprintf(self.c.Tr.ConflictsResolved, self.c.Git().Status.WorkingTreeState().CommandName()),
|
||||
HandleConfirm: func() error {
|
||||
// By the time we get here, we might have unstaged changes again,
|
||||
// e.g. if the user had to fix build errors after resolving the
|
||||
|
|
|
@ -1391,7 +1391,7 @@ func EnglishTranslationSet() *TranslationSet {
|
|||
SecondaryTitle: "Secondary",
|
||||
ReflogCommitsTitle: "Reflog",
|
||||
GlobalTitle: "Global keybindings",
|
||||
ConflictsResolved: "All merge conflicts resolved. Continue?",
|
||||
ConflictsResolved: "All merge conflicts resolved. Continue the %s?",
|
||||
Continue: "Continue",
|
||||
UnstagedFilesAfterConflictsResolved: "Files have been modified since conflicts were resolved. Auto-stage them and continue?",
|
||||
Keybindings: "Keybindings",
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package components
|
||||
|
||||
import "fmt"
|
||||
|
||||
// for running common actions
|
||||
type Common struct {
|
||||
t *TestDriver
|
||||
|
@ -43,10 +45,10 @@ func (self *Common) AcknowledgeConflicts() {
|
|||
Confirm()
|
||||
}
|
||||
|
||||
func (self *Common) ContinueOnConflictsResolved() {
|
||||
func (self *Common) ContinueOnConflictsResolved(command string) {
|
||||
self.t.ExpectPopup().Confirmation().
|
||||
Title(Equals("Continue")).
|
||||
Content(Contains("All merge conflicts resolved. Continue?")).
|
||||
Content(Contains(fmt.Sprintf("All merge conflicts resolved. Continue the %s?", command))).
|
||||
Confirm()
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
|
||||
t.Views().Information().Content(Contains("Rebasing"))
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("rebase")
|
||||
|
||||
t.Views().Information().Content(DoesNotContain("Rebasing"))
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
IsFocused().
|
||||
PressPrimaryAction()
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("rebase")
|
||||
|
||||
t.Views().Information().Content(DoesNotContain("Rebasing"))
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ var RebaseConflictsFixBuildErrors = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
|
||||
popup := t.ExpectPopup().Confirmation().
|
||||
Title(Equals("Continue")).
|
||||
Content(Contains("All merge conflicts resolved. Continue?"))
|
||||
Content(Contains("All merge conflicts resolved. Continue the rebase?"))
|
||||
|
||||
// While the popup is showing, fix some build errors
|
||||
t.Shell().UpdateFile("file", "make it compile again")
|
||||
|
|
|
@ -69,7 +69,7 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
SelectNextItem().
|
||||
PressPrimaryAction()
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("rebase")
|
||||
|
||||
t.Views().Files().IsEmpty()
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ func doTheRebaseForAmendTests(t *TestDriver, keys config.KeybindingConfig) {
|
|||
|
||||
t.ExpectPopup().Confirmation().
|
||||
Title(Equals("Continue")).
|
||||
Content(Contains("All merge conflicts resolved. Continue?")).
|
||||
Content(Contains("All merge conflicts resolved. Continue the rebase?")).
|
||||
Cancel()
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ var ResolveExternally = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
}).
|
||||
Press(keys.Universal.Refresh)
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("merge")
|
||||
|
||||
t.Views().Files().
|
||||
IsEmpty()
|
||||
|
|
|
@ -51,6 +51,6 @@ var ResolveMultipleFiles = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
).
|
||||
PressPrimaryAction()
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("merge")
|
||||
},
|
||||
})
|
||||
|
|
|
@ -43,7 +43,7 @@ var ResolveWithoutTrailingLf = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
|
||||
t.ExpectPopup().Alert().
|
||||
Title(Equals("Continue")).
|
||||
Content(Contains("All merge conflicts resolved. Continue?")).
|
||||
Content(Contains("All merge conflicts resolved. Continue the merge?")).
|
||||
Cancel()
|
||||
|
||||
t.Views().Files().
|
||||
|
|
|
@ -93,7 +93,7 @@ var DiscardAllDirChanges = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
Confirm()
|
||||
}).
|
||||
Tap(func() {
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("merge")
|
||||
t.ExpectPopup().Confirmation().
|
||||
Title(Equals("Continue")).
|
||||
Content(Contains("Files have been modified since conflicts were resolved. Auto-stage them and continue?")).
|
||||
|
|
|
@ -53,7 +53,7 @@ var DiscardVariousChanges = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
|
||||
t.ExpectPopup().Confirmation().
|
||||
Title(Equals("Continue")).
|
||||
Content(Contains("All merge conflicts resolved. Continue?")).
|
||||
Content(Contains("All merge conflicts resolved. Continue the merge?")).
|
||||
Cancel()
|
||||
|
||||
discardOneByOne([]statusFile{
|
||||
|
|
|
@ -40,7 +40,7 @@ var DiscardVariousChangesRangeSelect = NewIntegrationTest(NewIntegrationTestArgs
|
|||
|
||||
t.ExpectPopup().Confirmation().
|
||||
Title(Equals("Continue")).
|
||||
Content(Contains("All merge conflicts resolved. Continue?")).
|
||||
Content(Contains("All merge conflicts resolved. Continue the merge?")).
|
||||
Cancel()
|
||||
}).
|
||||
Lines(
|
||||
|
|
|
@ -60,7 +60,7 @@ var AmendCommitWithConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
SelectNextItem().
|
||||
PressPrimaryAction() // pick "4"
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("rebase")
|
||||
|
||||
t.Common().AcknowledgeConflicts()
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ func handleConflictsFromSwap(t *TestDriver) {
|
|||
SelectNextItem().
|
||||
PressPrimaryAction() // pick "three"
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("rebase")
|
||||
|
||||
t.Common().AcknowledgeConflicts()
|
||||
|
||||
|
@ -56,7 +56,7 @@ func handleConflictsFromSwap(t *TestDriver) {
|
|||
SelectNextItem().
|
||||
PressPrimaryAction() // pick "two"
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("rebase")
|
||||
|
||||
t.Views().Commits().
|
||||
Focus().
|
||||
|
|
|
@ -71,7 +71,7 @@ var MoveToEarlierCommitFromAddedFile = NewIntegrationTest(NewIntegrationTestArgs
|
|||
SelectNextItem().
|
||||
PressPrimaryAction() // choose the version with all three lines
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("rebase")
|
||||
|
||||
t.Views().Commits().
|
||||
Focus().
|
||||
|
|
|
@ -67,7 +67,7 @@ var MoveToIndexFromAddedFileWithConflict = NewIntegrationTest(NewIntegrationTest
|
|||
SelectNextItem().
|
||||
PressPrimaryAction()
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("rebase")
|
||||
|
||||
t.ExpectPopup().Alert().
|
||||
Title(Equals("Error")).
|
||||
|
|
|
@ -62,7 +62,7 @@ var MoveToIndexWithConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
).
|
||||
PressPrimaryAction()
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("rebase")
|
||||
|
||||
t.ExpectPopup().Alert().
|
||||
Title(Equals("Error")).
|
||||
|
|
|
@ -60,7 +60,7 @@ var PullMergeConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
).
|
||||
PressPrimaryAction() // choose 'content4'
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("merge")
|
||||
|
||||
t.Views().Status().Content(Equals("↑2 repo → master"))
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ var PullRebaseConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
SelectNextItem().
|
||||
PressPrimaryAction() // choose 'content4'
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("rebase")
|
||||
|
||||
t.Views().Status().Content(Equals("↑1 repo → master"))
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ var PullRebaseInteractiveConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
SelectNextItem().
|
||||
PressPrimaryAction() // choose 'content4'
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("rebase")
|
||||
|
||||
t.Views().Status().Content(Equals("↑2 repo → master"))
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ var PullRebaseInteractiveConflictDrop = NewIntegrationTest(NewIntegrationTestArg
|
|||
SelectNextItem().
|
||||
PressPrimaryAction() // choose 'content4'
|
||||
|
||||
t.Common().ContinueOnConflictsResolved()
|
||||
t.Common().ContinueOnConflictsResolved("rebase")
|
||||
|
||||
t.Views().Status().Content(Equals("↑1 repo → master"))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue