Thread (6 messages) 6 messages, 3 authors, 2024-01-05

Re: rebase invoking pre-commit

From: Phillip Wood <hidden>
Date: 2023-12-22 10:06:02

Hi Sean

On 21/12/2023 20:58, Sean Allred wrote:
Is there a current reason why pre-commit shouldn't be invoked during
rebase, or is this just waiting for a reviewable patch?
The reason that we don't run the pre-commit hook is that the commit 
being rebased may have been created with "git commit --no-verify" and so 
running the pre-commit hook would stop it from being rebased - see 
e637122ef2 (rebase -m: do not trigger pre-commit verification, 2008-03-16).

I think that most of the time it would be valuable to run the pre-commit 
hook when committing a conflict resolution but we'd need to add 
something like "git rebase --continue --no-verify" as a way to bypass it 
when resolving conflicts in commits that were created with "git commit 
--no-verify".

Best Wishes

Phillip
This was brought up before at [1] in 2015, but that thread so old at
this point that it seemed prudent to double-check before investing time
in a developing and testing a patch.

[1]: https://lore.kernel.org/git/1m55i3m.1fum4zo1fpnhncM%25lists@haller-berlin.de/ (local)

--
Sean Allred
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help