Allow pasting commits more than once
After pasting commits once, we hide the cherry-picking status (as if it had been reset), and no longer paint the copied commits with blue hashes; however, we still allow pasting them again. This can be useful e.g. to backport a bugfix to multiple major version release branches.
This commit is contained in:
@@ -79,5 +79,32 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Contains("one"),
|
||||
Contains("base"),
|
||||
)
|
||||
|
||||
// Even though the cherry-picking mode has been reset, it's still possible to paste the copied commits again:
|
||||
t.Views().Branches().
|
||||
Focus().
|
||||
NavigateToLine(Contains("master")).
|
||||
PressPrimaryAction()
|
||||
|
||||
t.Views().Commits().
|
||||
Focus().
|
||||
Lines(
|
||||
Contains("base").IsSelected(),
|
||||
).
|
||||
Press(keys.Commits.PasteCommits).
|
||||
Tap(func() {
|
||||
t.ExpectPopup().Alert().
|
||||
Title(Equals("Cherry-pick")).
|
||||
Content(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?")).
|
||||
Confirm()
|
||||
}).
|
||||
Tap(func() {
|
||||
t.Views().Information().Content(DoesNotContain("commits copied"))
|
||||
}).
|
||||
Lines(
|
||||
Contains("four"),
|
||||
Contains("three"),
|
||||
Contains("base"),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user