From: Phillip Wood <phillip.wood123@gmail.com>
To: Sean Allred <allred.sean@gmail.com>, Git List <git@vger.kernel.org>
Subject: Re: rebase invoking pre-commit
Date: Fri, 22 Dec 2023 10:05:56 +0000 [thread overview]
Message-ID: <bf1ce173-50d7-405f-88c1-7edb7ec5a55a@gmail.com> (raw)
In-Reply-To: <m0sf3vi86g.fsf@epic96565.epic.com>
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/
>
> --
> Sean Allred
>
next prev parent reply other threads:[~2023-12-22 10:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 20:58 rebase invoking pre-commit Sean Allred
2023-12-22 10:05 ` Phillip Wood [this message]
2023-12-22 22:05 ` Sean Allred
2023-12-26 16:33 ` Junio C Hamano
2023-12-23 21:37 ` Elijah Newren
2023-12-31 10:52 ` Sean Allred
2024-01-05 4:59 ` Elijah Newren
2024-01-05 16:26 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf1ce173-50d7-405f-88c1-7edb7ec5a55a@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=allred.sean@gmail.com \
--cc=git@vger.kernel.org \
--cc=phillip.wood@dunelm.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).