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

Re: [PATCH v2 3/3] hook-list.h: add a generated list of hooks, like config-list.h

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 29, 2021, 22:09 UTC
Message-ID
<87fsx0fhjb.fsf@evledraar.gmail.com>
In-Reply-To
<76bd9738-65e8-3696-7934-8090b5912427@web.de>
On Tue, Jun 29 2021, René Scharfe wrote:
Show 42 quoted lines
> Am 29.06.21 um 20:54 schrieb Ævar Arnfjörð Bjarmason:
>> Make githooks(5) the source of truth for what hooks git supports, and
>> die hooks we don't know about in find_hook(). This ensures that the
>> documentation and the C code's idea about existing hooks doesn't
>> diverge.
>>
>> We still have Perl and Python code running its own hooks, but that'll
>> be addressed by Emily Shaffer's upcoming "git hook run" command.
>>
>> This resolves a long-standing TODO item in bugreport.c of there being
>> no centralized listing of hooks, and fixes a bug with the bugreport
>> listing only knowing about 1/4 of the p4 hooks. It didn't know about
>> the recent "reference-transaction" hook either.
>>
>> I have not been able to directly test the CMake change being made
>> here. Since 4c2c38e800 (ci: modification of main.yml to use cmake for
>> vs-build job, 2020-06-26) some of the Windows CI has a hard dependency
>> on CMake, this change works there, and is to my eyes an obviously
>> correct use of a pattern established in previous CMake changes,
>> namely:
>>
>>  - 061c2240b1 (Introduce CMake support for configuring Git,
>>     2020-06-12)
>>  - 709df95b78 (help: move list_config_help to builtin/help,
>>     2020-04-16)
>>  - 976aaedca0 (msvc: add a Makefile target to pre-generate the Visual
>>    Studio solution, 2019-07-29)
>>
>> The LC_ALL=C is needed because at least in my locale the dash ("-") is
>> ignored for the purposes of sorting, which results in a different
>> order. I'm not aware of anything in git that has a hard dependency on
>> the order, but e.g. the bugreport output would end up using whatever
>> locale was in effect when git was compiled.
>>
>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>> Signed-off-by: René Scharfe <l.s.r@web.de>
>
> Please remove my sign-off line.  The code looks OK, but there are
> basically only trivial traces of my suggestion left.  That's fine, but
> it makes my sign-off unnecessary, and I cannot certify the origin of the
> rest of the patch.  You could turn it into a Helped-by or
> Contributions-by if you like.

Isn't that what the SOB is for though? I.e. a copyright audit trail, I wouldn't have come up with that sed code myself, it's copied & adjusted from your version.

I can re-roll with a Helped-by if you/Junio think that's appropriate, I just thought this was /the/ use-case for SOB.

Previous: René ScharfeNext: Emily Shaffer
Message 17 of 21 in “Add a generated list of hooks in hook-list.h”
  1. 0/3 Add a generated list of hooks in hook-list.hÆvar Arnfjörð Bjarmason, Jun 17, 2021
  2. 1/3 hook.[ch]: move find_hook() to this new libraryÆvar Arnfjörð Bjarmason, Jun 17, 2021
  3. 2/3 hook.c: add a hook_exists() wrapper and use it in bugreport.cÆvar Arnfjörð Bjarmason, Jun 17, 2021
  4. 3/3 hook-list.h: add a generated list of hooks, like config-list.hÆvar Arnfjörð Bjarmason, Jun 17, 2021
  5. SZEDER GáborJun 18, 2021
  6. Eric SunshineJun 18, 2021
  7. Junio C HamanoJun 19, 2021
  8. Ævar Arnfjörð BjarmasonJun 20, 2021
  9. René ScharfeJun 20, 2021
  10. Johannes SchindelinJun 22, 2021
  11. Junio C HamanoJun 29, 2021
  12. René ScharfeJun 29, 2021
  13. 0/3 Add a generated list of hooks in hook-list.hÆvar Arnfjörð Bjarmason, Jun 29, 2021
  14. 1/3 hook.[ch]: move find_hook() to this new libraryÆvar Arnfjörð Bjarmason, Jun 29, 2021
  15. 3/3 hook-list.h: add a generated list of hooks, like config-list.hÆvar Arnfjörð Bjarmason, Jun 29, 2021
  16. René ScharfeJun 29, 2021
  17. Ævar Arnfjörð BjarmasonJun 29, 2021
  18. Emily ShafferJul 9, 2021
  19. Ævar Arnfjörð BjarmasonJul 10, 2021
  20. Emily ShafferJul 12, 2021
  21. 2/3 hook.c: add a hook_exists() wrapper and use it in bugreport.cÆvar Arnfjörð Bjarmason, Jun 29, 2021

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.