Skip to content

Commit

Permalink
trace2:data: add subverb to reset command
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
  • Loading branch information
jeffhostetler committed Dec 21, 2018
1 parent 0bfdd41 commit b006aff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions builtin/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
if (patch_mode) {
if (reset_type != NONE)
die(_("--patch is incompatible with --{hard,mixed,soft}"));
trace2_cmd_subverb("patch-interactive");
return run_add_interactive(rev, "--patch=reset", &pathspec);
}

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

if (read_from_stdin)
trace2_cmd_subverb("path-stdin");
else if (pathspec.nr)
trace2_cmd_subverb("path");
else
trace2_cmd_subverb(reset_type_names[reset_type]);

if (reset_type != SOFT && (reset_type != MIXED || get_git_work_tree()))
setup_work_tree();

Expand Down

0 comments on commit b006aff

Please sign in to comment.