diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2019-02-22 23:25:06 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-02-23 00:28:21 +0100 |
commit | 6206286e49b88bd4bb709c62e7b7455685c1993a (patch) | |
tree | e127ef78c19956cd4ac159219b9a7b4c8310b46e /builtin | |
parent | trace2:data: add trace2 transport child classification (diff) | |
download | git-6206286e49b88bd4bb709c62e7b7455685c1993a.tar.xz git-6206286e49b88bd4bb709c62e7b7455685c1993a.zip |
trace2:data: add trace2 hook classification
Classify certain child processes as hooks.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/am.c | 1 | ||||
-rw-r--r-- | builtin/receive-pack.c | 4 | ||||
-rw-r--r-- | builtin/worktree.c | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/builtin/am.c b/builtin/am.c index 58a2aef28b..cca494d9c3 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -453,6 +453,7 @@ static int run_post_rewrite_hook(const struct am_state *state) cp.in = xopen(am_path(state, "rewritten"), O_RDONLY); cp.stdout_to_stderr = 1; + cp.trace2_hook_name = "post-rewrite"; ret = run_command(&cp); diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index d58b7750b6..8bc714a5fc 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -694,6 +694,8 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed, proc.argv = argv; proc.in = -1; proc.stdout_to_stderr = 1; + proc.trace2_hook_name = hook_name; + if (feed_state->push_options) { int i; for (i = 0; i < feed_state->push_options->nr; i++) @@ -807,6 +809,7 @@ static int run_update_hook(struct command *cmd) proc.stdout_to_stderr = 1; proc.err = use_sideband ? -1 : 0; proc.argv = argv; + proc.trace2_hook_name = "update"; code = start_command(&proc); if (code) @@ -1190,6 +1193,7 @@ static void run_update_post_hook(struct command *commands) proc.no_stdin = 1; proc.stdout_to_stderr = 1; proc.err = use_sideband ? -1 : 0; + proc.trace2_hook_name = "post-update"; if (!start_command(&proc)) { if (use_sideband) diff --git a/builtin/worktree.c b/builtin/worktree.c index 3f9907fcc9..6cc094a453 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -402,6 +402,7 @@ done: cp.dir = path; cp.env = env; cp.argv = NULL; + cp.trace2_hook_name = "post-checkout"; argv_array_pushl(&cp.args, absolute_path(hook), oid_to_hex(&null_oid), oid_to_hex(&commit->object.oid), |