trace2:data: add subverb to checkout command
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff Hostetler committed
Feb 22, 2019 at 14:25 UTC
e27dd8ae9ff894b60d2f9212db7ff9ce80e2826b
1 file changed
+7
builtin/checkout.c
+7
@@ -263,6 +263,8 @@ static int checkout_paths(const struct checkout_opts *opts,
263
struct lock_file lock_file = LOCK_INIT;
264
int nr_checkouts = 0, nr_unmerged = 0;
265
266
+ trace2_cmd_mode(opts->patch_mode ? "patch" : "path");
267
+
268
if (opts->track != BRANCH_TRACK_UNSPECIFIED)
269
die(_("'%s' cannot be used with updating paths"), "--track");
270
@@ -966,6 +968,9 @@ static int switch_branches(const struct checkout_opts *opts,
968
void *path_to_free;
969
struct object_id rev;
970
int flag, writeout_error = 0;
971
+
972
+ trace2_cmd_mode("branch");
973
+
974
memset(&old_branch_info, 0, sizeof(old_branch_info));
975
old_branch_info.path = path_to_free = resolve_refdup("HEAD", 0, &rev, &flag);
976
if (old_branch_info.path)
@@ -1203,6 +1208,8 @@ static int switch_unborn_to_new_branch(const struct checkout_opts *opts)
1208
int status;
1209
struct strbuf branch_ref = STRBUF_INIT;
1210
1211
+ trace2_cmd_mode("unborn");
1212
+
1213
if (!opts->new_branch)
1214
die(_("You are on a branch yet to be born"));
1215
strbuf_addf(&branch_ref, "refs/heads/%s", opts->new_branch);