Remove the "Select parent commit" prompt when reverting a merge commit

In pretty much 100% of the cases, you want to use -m1, so spare users the
complexity of a confusing prompt.

See
https://public-inbox.org/git/e60a8b1a-98c8-4ac7-b966-ff9635bb781d@haller-berlin.de/
for some discussion.
This commit is contained in:
Stefan Haller 2025-03-30 11:54:40 +02:00
parent c13c6356e3
commit f14a3cdd46
4 changed files with 12 additions and 51 deletions

View file

@ -21,14 +21,9 @@ var RevertMerge = NewIntegrationTest(NewIntegrationTestArgs{
).
Press(keys.Commits.RevertCommit)
t.ExpectPopup().Menu().
Title(Equals("Select parent commit for merge")).
Lines(
Contains("first change"),
Contains("second-change-branch unrelated change"),
Contains("Cancel"),
).
Select(Contains("first change")).
t.ExpectPopup().Confirmation().
Title(Equals("Revert commit")).
Content(MatchesRegexp(`Are you sure you want to revert \w+?`)).
Confirm()
t.Views().Commits().IsFocused().