Skip to content

Commit 0bd7f57

Browse files
garimasi514gitster
authored andcommitted
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 <[email protected]> Acked-by: Jeff Hostetler <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bc12974 commit 0bd7f57

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

builtin/commit-graph.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ static int graph_verify(int argc, const char **argv)
5858
OPT_END(),
5959
};
6060

61+
trace2_cmd_mode("verify");
62+
6163
argc = parse_options(argc, argv, NULL,
6264
builtin_commit_graph_verify_options,
6365
builtin_commit_graph_verify_usage, 0);
@@ -102,6 +104,8 @@ static int graph_read(int argc, const char **argv)
102104
OPT_END(),
103105
};
104106

107+
trace2_cmd_mode("read");
108+
105109
argc = parse_options(argc, argv, NULL,
106110
builtin_commit_graph_read_options,
107111
builtin_commit_graph_read_usage, 0);
@@ -183,6 +187,8 @@ static int graph_write(int argc, const char **argv)
183187
split_opts.max_commits = 0;
184188
split_opts.expire_time = 0;
185189

190+
trace2_cmd_mode("write");
191+
186192
argc = parse_options(argc, argv, NULL,
187193
builtin_commit_graph_write_options,
188194
builtin_commit_graph_write_usage, 0);

0 commit comments

Comments
 (0)