1
0
mirror of https://github.com/git/git.git synced 2024-09-28 16:13:01 +02:00

commit-graph: emit trace2 cmd_mode for each sub-command

Emit trace2_cmd_mode() messages for each commit-graph
sub-command.

The commit graph commands were in flux when trace2 was
making it's way to git. Now that we have enough sub-commands
in commit-graph, we can label the various modes within them.
Distinguishing between read, write and verify is a great
start.

Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Acked-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Garima Singh 2019-08-27 09:56:34 -07:00 committed by Junio C Hamano
parent bc12974a89
commit 0bd7f578b2

@ -58,6 +58,8 @@ static int graph_verify(int argc, const char **argv)
OPT_END(),
};
trace2_cmd_mode("verify");
argc = parse_options(argc, argv, NULL,
builtin_commit_graph_verify_options,
builtin_commit_graph_verify_usage, 0);
@ -102,6 +104,8 @@ static int graph_read(int argc, const char **argv)
OPT_END(),
};
trace2_cmd_mode("read");
argc = parse_options(argc, argv, NULL,
builtin_commit_graph_read_options,
builtin_commit_graph_read_usage, 0);
@ -183,6 +187,8 @@ static int graph_write(int argc, const char **argv)
split_opts.max_commits = 0;
split_opts.expire_time = 0;
trace2_cmd_mode("write");
argc = parse_options(argc, argv, NULL,
builtin_commit_graph_write_options,
builtin_commit_graph_write_usage, 0);