]> Kevux Git Server - rit/commit
hook: warn when hook.<friendly-name>.jobs is set
authorAdrian Ratiu <adrian.ratiu@collabora.com>
Fri, 10 Apr 2026 09:06:04 +0000 (12:06 +0300)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Apr 2026 14:58:54 +0000 (07:58 -0700)
commit5e57b209ff21bf1087dd8539c458737c89b03150
tree4891d525b0762b61c9d1b47b122348ddb6430dc5
parent084a55b3adf33f70c84091d5957b8bede9b01174
hook: warn when hook.<friendly-name>.jobs is set

Issue a warning when the user confuses the hook process and event
namespaces by setting hook.<friendly-name>.jobs.

Detect this by checking whether the name carrying .jobs also has
.command, .event, or .parallel configured.  Extract is_friendly_name()
as a helper for this check, to be reused by future per-event config
handling.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
hook.c
t/t1800-hook.sh