Show "exec" todos in the list of rebase todos

Unfortunately it isn't possible to delete them. This would often be useful, but
our todo rewriting mechanisms rely on being able to find todos by some
identifier (hash for pick, ref for update-ref), and exec todos don't have a
unique identifier.
This commit is contained in:
Stefan Haller 2024-06-12 11:17:39 +02:00
parent 906d21f3ce
commit 899e25b208
5 changed files with 65 additions and 0 deletions

View file

@ -284,6 +284,9 @@ func (self *LocalCommitsController) GetOnRenderToMain() func() error {
map[string]string{
"ref": strings.TrimPrefix(commit.Name, "refs/heads/"),
}))
} else if commit.Action == todo.Exec {
task = types.NewRenderStringTask(
self.c.Tr.ExecCommandHere + "\n\n" + commit.Name)
} else {
cmdObj := self.c.Git().Commit.ShowCmdObj(commit.Hash, self.c.Modes().Filtering.GetPath())
task = types.NewRunPtyTask(cmdObj.GetCmd())