Thread (5 messages) 5 messages, 4 authors, 2019-10-02
STALE2455d

[PATCH 1/1] commit-graph: emit trace2 cmd_mode for each sub-command

From: Garima Singh via GitGitGadget <hidden>
Date: 2019-08-27 16:56:39
Subsystem: the rest · Maintainer: Linus Torvalds

From: Garima Singh <redacted>

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 <redacted>
---
 builtin/commit-graph.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
index 57863619b7..ef68b26744 100644
--- a/builtin/commit-graph.c
+++ b/builtin/commit-graph.c
@@ -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);
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help