Subject: Re: [PATCH v2 0/6] config-based hooks restarted

From: Junio C Hamano <[email-masked]>
Date: Wed, 11 Aug 2021 22:02:53 -0700

Junio C Hamano <[email-masked]> writes:

> Emily Shaffer <[email-masked]> writes:
>
>> This is the config-based hooks topic rebased onto v4 of Ævar's
>> branch[1].
>
> I have [1] in my tree, but these patches do not seem to apply
> cleanly; I see a failure in "git hooks list" step.
>
> Should I perhaps try merging [1] to one of the v2.33-rc and then
> queue these on top?

Ah, I figured it out.  Your 3/6 seems to be stale wrt 4787177b
(hook: support passing stdin to hooks, 2021-08-03) that came from
https://lore.kernel.org/git/[email-masked]/

That patch did this to the early part of builtin/hook.c:

        diff --git a/builtin/hook.c b/builtin/hook.c
        index f33db9953c..27dce6a2f0 100644
        --- a/builtin/hook.c
        +++ b/builtin/hook.c
        @@ -7,7 +7,7 @@
         #include "strvec.h"

         #define BUILTIN_HOOK_RUN_USAGE \
        -	N_("git hook run [--ignore-missing] <hook-name> [-- <hook-args>]")
        +	N_("git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-args>]")

         static const char * const builtin_hook_usage[] = {
                BUILTIN_HOOK_RUN_USAGE,

but your [v2 3/6] here expects something entirely different.

        diff --git a/builtin/hook.c b/builtin/hook.c
        index 12c9126032..c36b05376c 100644
        --- a/builtin/hook.c
        +++ b/builtin/hook.c
        @@ -8,8 +8,11 @@

         #define BUILTIN_HOOK_RUN_USAGE \
                N_("git hook run [--to-stdin=<path>] <hook-name> [-- <hook-args>]")
        +#define BUILTIN_HOOK_LIST_USAGE \
        +	N_("git hook list <hook-name>")

I've wiggled the patch in, as there wasn't any other funny
inconsistency like this one, but please double check the result
after I push it out perhaps tomorrow morning.

Thanks.