提交 c18b6c1a 编写于 作者: J Jeff Hostetler 提交者: Junio C Hamano

trace2:data: add subverb to reset command

Signed-off-by: NJeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 e27dd8ae
...@@ -341,6 +341,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix) ...@@ -341,6 +341,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
if (patch_mode) { if (patch_mode) {
if (reset_type != NONE) if (reset_type != NONE)
die(_("--patch is incompatible with --{hard,mixed,soft}")); die(_("--patch is incompatible with --{hard,mixed,soft}"));
trace2_cmd_mode("patch-interactive");
return run_add_interactive(rev, "--patch=reset", &pathspec); return run_add_interactive(rev, "--patch=reset", &pathspec);
} }
...@@ -357,6 +358,11 @@ int cmd_reset(int argc, const char **argv, const char *prefix) ...@@ -357,6 +358,11 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
if (reset_type == NONE) if (reset_type == NONE)
reset_type = MIXED; /* by default */ reset_type = MIXED; /* by default */
if (pathspec.nr)
trace2_cmd_mode("path");
else
trace2_cmd_mode(reset_type_names[reset_type]);
if (reset_type != SOFT && (reset_type != MIXED || get_git_work_tree())) if (reset_type != SOFT && (reset_type != MIXED || get_git_work_tree()))
setup_work_tree(); setup_work_tree();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册