pre-commit hook not run on conflict resolution during rebase

From: Stefan Haller <hidden>
Date: 2016-06-15 23:05:02

When a rebase stops because of a conflict, and I edit the file to
resolve the conflict and say "git rebase --continue", then the
pre-commit hook doesn't run at that point, which means that I can commit
bad stuff which the pre-commit hook would normally not allow in. We were
bitten by this a few times already. (In our case, the hook rejects code
that hasn't been run through clang-format. That's easy to forget when
resolving conflicts during a rebase.)
From glancing through the githooks manpage, I couldn't see any other
hook that would help in this situation. Am I missing something?

I guess the next best solution would be to also have a pre-push hook
that performs the same checks again, just in case the bad code managed
to get past the pre-commit hook for some reason or other. This feels
very redundant, but I guess it would work well.

Any other suggestions?


-- 
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help