Resolved conflicts:
- commits_helper.go: combined both new imports (models + gocui)
- local_commits_controller.go: kept parentIdx from HEAD and
Keys/GetKeys API change from master
Some tests assert that a specific commit subject does or doesn't occur
in the main view; interactive_rebase/outside_rebase_range_select.go is
an example for this, it asserts `t.Views().Main().Content(
DoesNotContain("commit 06"))`. The problem with this kind of assertion
and our test commit naming scheme is that the diff view begins with a
"commit <hash>" line, and when that hash happens to start with "06" the
assertion matched it and failed spuriously. This was usually masked by
our MaxAttempts=2 that we currently use for integration tests (it's
quite unlikely that the commit gets a hash beginning with "06" twice in
a row). However, we want to get to a state where we can set MaxAttempts
to 1, so make this more robust by changing our naming scheme.
- Able to accurately select the parent commit now, preventing incorrect
operations on merge commits and complex histories.
- Updated method signatures to accept a parent commit index for precise
targeting.
- Improved english confirmation prompts and translations to clarify
actions affect the parent commit below.
- Fixed: squash "s", drop "d", reword "r/R", discard "d",
edit/interactive-rebase "e", fixup "f", amend "a/A, patch "Ctrl-P"
- Not yet fixed: interative-rebase "i"
fix: GetParentCommit edge cases
By constructing an arg vector manually, we no longer need to quote arguments
Mandate that args must be passed when building a command
Now you need to provide an args array when building a command.
There are a handful of places where we need to deal with a string,
such as with user-defined custom commands, and for those we now require
that at the callsite they use str.ToArgv to do that. I don't want
to provide a method out of the box for it because I want to discourage its
use.
For some reason we were invoking a command through a shell when amending a
commit, and I don't believe we needed to do that as there was nothing user-
supplied about the command. So I've switched to using a regular command out-
side the shell there