Thread (581 messages) flat view 581 messages, 16 authors, 2021-10-12

Re: [PATCH v7 06/17] hook: implement hookcmd.<name>.skip

From: Emily Shaffer <hidden>
Date: 2021-02-09 23:15:29

On Sat, Jan 30, 2021 at 07:40:30PM -0800, Jonathan Tan wrote:
quoted
If a user wants a specific repo to skip execution of a hook which is set
at a global or system level, they can now do so by specifying 'skip' in
their repo config:
Usually the present tense describes the situation before the commit, so
maybe s/they can now do so/they will be able to do so/.
Sure.
quoted
-static void append_or_move_hook(struct list_head *head, const char *command)
+static struct hook* find_hook_by_command(struct list_head *head, const char *command)
"* " -> " *"
Thanks.
[snip tests]

For the tests, I thought of the case in which we skip a hookcmd that was
never specified as a hook, but that's probably not very useful.
Ah, it might be useful to make sure we don't choke trying to remove
something that isn't there - I'll add one.


By the way, I got feedback from Googlers using config hooks that "skip"
isn't actually documented anywhere public-facing. For v8 I've added a
section on it to Documentation/git-hook.txt as well as to
Documentation/config/hook.txt.

 - Emily
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help