Merge branch 'nd/no-more-check-racy'
[gitweb.git] / builtin / reset.c
index 59898c972eee5e8065c2a68b7c937cc3af11f513..7882829a95d8294ea5bb5bcba3335e651233d79a 100644 (file)
@@ -7,6 +7,7 @@
  *
  * Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano
  */
+#define USE_THE_INDEX_COMPATIBILITY_MACROS
 #include "builtin.h"
 #include "config.h"
 #include "lockfile.h"
@@ -340,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);
        }
 
@@ -356,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();