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