summaryrefslogtreecommitdiff
path: root/builtin/reset.c
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2019-02-22 22:25:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-02-22 23:28:21 (GMT)
commitc18b6c1a2b8cea158d91481e38f983cd664a9aa0 (patch)
treebebcf5148b0a681db55a44888fe19503aa11ed24 /builtin/reset.c
parente27dd8ae9ff894b60d2f9212db7ff9ce80e2826b (diff)
downloadgit-c18b6c1a2b8cea158d91481e38f983cd664a9aa0.zip
git-c18b6c1a2b8cea158d91481e38f983cd664a9aa0.tar.gz
git-c18b6c1a2b8cea158d91481e38f983cd664a9aa0.tar.bz2
trace2:data: add subverb to reset command
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/reset.c')
-rw-r--r--builtin/reset.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/reset.c b/builtin/reset.c
index 4d18a46..7882829 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -341,6 +341,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_mode("patch-interactive");
return run_add_interactive(rev, "--patch=reset", &pathspec);
}
@@ -357,6 +358,11 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
if (reset_type == NONE)
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()))
setup_work_tree();