On Fri, Apr 21, 2023 at 11:12 AM Phillip Wood via GitGitGadget <gitgitgadget@xxxxxxxxx> wrote: > If a commit cannot be picked because it would overwrite an untracked > file then "git rebase --continue" should refuse to commit any staged > changes as the commit was not picked. Do this by using the existing > check for a missing author script in run_git_commit() which prevents > "rebase --continue" from committing staged changes after failed exec > commands. > > When fast-forwarding it is not necessary to write the author script as > we're reusing an existing commit, not creating a new one. If a > fast-forwarded commit is modified by an "edit" or "reword" command then > the modification is committed with "git commit --amend" which reuses the > author of the commit being amended so the author script is not needed. > baf8ec8d3a (rebase -r: don't write .git/MERGE_MSG when fast-forwarding, > 2021-08-20) changed run_git_commit() to allow a missing author script > when rewording a commit. This changes extends that to allow a missing s/changes/change/ > author script whenever the commit is being amended. > > If we're not fast-forwarding then we must remove the author script if > the pick fails. > > Signed-off-by: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>