-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Please complete the following tasks
- I have searched the discussions
- I have searched the existing issues
Description
git stack amend -e fails to apply staged changes and to edit the commit message at the same time if the current branch has another branch stacked on top.
git-stack allows the user to write the message but then errors out with cannot reword; first squash dependent fixups. The staged changes get added as a new fixup! commit. The message is lost.
Version
git-stack 0.10.15
Steps to reproduce
- Create two commits,
commit0andcommit1.commit1is on top ofcommit0. - Create two branches,
branch0oncommit0andbranch1oncommit1. - Switch to
branch0. - Make a change to the working tree and stage it.
- Run
git stack amend -e. - Write and save the commit message.
Actual Behaviour
Error happens after I've already typed the commit message. The message is irrecoverably lost. The staged changes end up in a new fixup! commit on top of branch0.
Expected Behaviour
git-stack performs the amend operation and changes the commit message.
Alternatively, git-stack warns that the operation cannot be performed before the user starts editing the commit message.
Alternatively, git-stack dumps the whole message into the console or into a temporary file.
Debug Output
No response