git-fixup icon indicating copy to clipboard operation
git-fixup copied to clipboard

Respect pre-commit hooks

Open mgehre-amd opened this issue 4 months ago • 1 comments

This is a great tool that I had waiting to have for last couple of years. Thanks!

What I currently see is the following:

  1. I make a change with a formatting error
  2. I do git add -p to stage it
  3. I do git fixup to fix it up
  4. git fixup tries to create a commit, but that fails due to my pre-commit hooks
  5. git fixup still calls interactive rebase, which now shows an editor with the rebase instructions; but there is no fixup commit here
  6. I save the interactive rebase editor, the no-op rebase happens, and I'm back. I now go and commit the formatting corrections.

It would be great if git-fixup would stop at 4. if the pre-commit hooks fail, and doesn't run the interactive rebase anyways.

mgehre-amd avatar Mar 01 '24 07:03 mgehre-amd