Re: rebase invoking pre-commit
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 26, 2023, 16:33 UTC
- Message-ID
- <xmqqa5pwkjp3.fsf@gitster.g>
- In-Reply-To
- <bf1ce173-50d7-405f-88c1-7edb7ec5a55a@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 9 quoted lines
> 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).
Very true. And back then we didn't have "rebase -x" mechanism but these days, anybody who is interested in running a command between each step can use it to run any validation script, not the one with fixed name called "hooks", so I'd place this to fairly low priority.
Thanks.