Re: [PATCH v2 4/6] rebase --continue: refuse to commit after failed command
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Apr 21, 2023, 19:14 UTC
- Message-ID
- <CAPig+cQ2z2jq05S1QxboBT-51gVSqsJsWTfGKRN6PPYxW=ZzmA@mail.gmail.com>
- In-Reply-To
- <9356d14b09a468d8ef2884cd7d76e59ec5c16691.1682089075.git.gitgitgadget@gmail.com>
On Fri, Apr 21, 2023 at 11:12 AM Phillip Wood via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 15 quoted lines
> 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/
Show 6 quoted lines
> 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@dunelm.org.uk>