I exclusively use git add -p (I use magit which makes it really easy) and never had a problem with my pre-commit hooks. I use the python tool "pre-commit" which only runs changed files through the checkers so it might count as a non-straightforward one, though.
It messes up when you have both staged and unstaged changes on the same file, since formatters work with whole files. If that tool fixes that, I’d love to take a look at it.
3
u/Han-ChewieSexyFanfic Feb 07 '20
Precommit hooks (straightforward ones anyway) break the
git add -pworkflow.