With git on the command line, you see the result of your pre-commit hooks before entering the commit's log message. If your pre-commit hook makes the commit fail, you are warnt and don't write anything.
But with magit, you are asked to enter your log comment and then it evaluates your hook, and if it fails you don't see why. You just read :
git exited abnormally with code 1.
I understand this is normal because it is when you are finished editing the log message that magit runs the git command.
So, how would you make magit to evaluate your hook before asking for the log ? How can you make magit display the result of the hook ?
And a related question would be, how do you give arguments to you pre-commit hook in order to run it for the stashed files only, instead of all the files in the repository ?
I use pre-commit hooks mainly to check if I didn't forget debugging stuff, like a remaining 'ipdb', and some personal traces.
Thanks !