git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Sean AllredNext: Elijah Newren
Message 4 of 8 in “rebase invoking pre-commit”
  1. Sean AllredDec 21, 2023
  2. Phillip WoodDec 22, 2023
  3. Sean AllredDec 22, 2023
  4. Junio C HamanoDec 26, 2023
  5. Elijah NewrenDec 23, 2023
  6. Sean AllredDec 31, 2023
  7. Elijah NewrenJan 5, 2024
  8. Junio C HamanoJan 5, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.