trace2:data: add subverb to reset 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 c18b6c1a2b8cea158d91481e38f983cd664a9aa0
1 file changed +6
builtin/reset.c
+6
@@ -341,6 +341,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
341 if (patch_mode) {
342 if (reset_type != NONE)
343 die(_("--patch is incompatible with --{hard,mixed,soft}"));
344 + trace2_cmd_mode("patch-interactive");
345 return run_add_interactive(rev, "--patch=reset", &pathspec);
346 }
347
@@ -357,6 +358,11 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
358 if (reset_type == NONE)
359 reset_type = MIXED; /* by default */
360
361 + if (pathspec.nr)
362 + trace2_cmd_mode("path");
363 + else
364 + trace2_cmd_mode(reset_type_names[reset_type]);
365 +
366 if (reset_type != SOFT && (reset_type != MIXED || get_git_work_tree()))
367 setup_work_tree();
368