Skip to content

Commit b006aff

Browse files
committed
trace2:data: add subverb to reset command
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
1 parent 0bfdd41 commit b006aff

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

builtin/reset.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
419419
if (patch_mode) {
420420
if (reset_type != NONE)
421421
die(_("--patch is incompatible with --{hard,mixed,soft}"));
422+
trace2_cmd_subverb("patch-interactive");
422423
return run_add_interactive(rev, "--patch=reset", &pathspec);
423424
}
424425

@@ -435,6 +436,13 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
435436
if (reset_type == NONE)
436437
reset_type = MIXED; /* by default */
437438

439+
if (read_from_stdin)
440+
trace2_cmd_subverb("path-stdin");
441+
else if (pathspec.nr)
442+
trace2_cmd_subverb("path");
443+
else
444+
trace2_cmd_subverb(reset_type_names[reset_type]);
445+
438446
if (reset_type != SOFT && (reset_type != MIXED || get_git_work_tree()))
439447
setup_work_tree();
440448

0 commit comments

Comments
 (0)