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>

Garima Singh committed Aug 27, 2019 at 09:56 UTC 0bd7f578b2ff8b622cb8db7a572aa68303162b2b
1 file changed +6
builtin/commit-graph.c
+6
@@ -58,6 +58,8 @@ static int graph_verify(int argc, const char **argv)
58 OPT_END(),
59 };
60
61 + trace2_cmd_mode("verify");
62 +
63 argc = parse_options(argc, argv, NULL,
64 builtin_commit_graph_verify_options,
65 builtin_commit_graph_verify_usage, 0);
@@ -102,6 +104,8 @@ static int graph_read(int argc, const char **argv)
104 OPT_END(),
105 };
106
107 + trace2_cmd_mode("read");
108 +
109 argc = parse_options(argc, argv, NULL,
110 builtin_commit_graph_read_options,
111 builtin_commit_graph_read_usage, 0);
@@ -183,6 +187,8 @@ static int graph_write(int argc, const char **argv)
187 split_opts.max_commits = 0;
188 split_opts.expire_time = 0;
189
190 + trace2_cmd_mode("write");
191 +
192 argc = parse_options(argc, argv, NULL,
193 builtin_commit_graph_write_options,
194 builtin_commit_graph_write_usage, 0);