Skip to content

Commit c18b6c1

Browse files
jeffhostetlergitster
authored andcommitted
trace2:data: add subverb to reset command
Signed-off-by: Jeff Hostetler <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e27dd8a commit c18b6c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

builtin/reset.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
341341
if (patch_mode) {
342342
if (reset_type != NONE)
343343
die(_("--patch is incompatible with --{hard,mixed,soft}"));
344+
trace2_cmd_mode("patch-interactive");
344345
return run_add_interactive(rev, "--patch=reset", &pathspec);
345346
}
346347

@@ -357,6 +358,11 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
357358
if (reset_type == NONE)
358359
reset_type = MIXED; /* by default */
359360

361+
if (pathspec.nr)
362+
trace2_cmd_mode("path");
363+
else
364+
trace2_cmd_mode(reset_type_names[reset_type]);
365+
360366
if (reset_type != SOFT && (reset_type != MIXED || get_git_work_tree()))
361367
setup_work_tree();
362368

0 commit comments

Comments
 (0)