git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Garima Singh via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Garima Singh <garima.singh@microsoft.com>
Subject: [PATCH 1/1] commit-graph: emit trace2 cmd_mode for each sub-command
Date: Tue, 27 Aug 2019 09:56:34 -0700 (PDT)	[thread overview]
Message-ID: <80496fdcfc42cd7ea883ea1a7200ab3611cbbca5.1566924992.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.323.git.gitgitgadget@gmail.com>

From: Garima Singh <garima.singh@microsoft.com>

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>
---
 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

  reply	other threads:[~2019-08-27 16:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 16:56 [PATCH 0/1] commit-graph: emit trace2 cmd_mode for each sub-command Garima Singh via GitGitGadget
2019-08-27 16:56 ` Garima Singh via GitGitGadget [this message]
2019-09-10 13:54 ` Garima Singh
2019-09-11 18:17   ` Jeff Hostetler
2019-10-02  8:02     ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80496fdcfc42cd7ea883ea1a7200ab3611cbbca5.1566924992.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=garima.singh@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).