convert run_add_interactive to use struct pathspec
[git/git.git] / builtin / reset.c
index 313b296..9bef869 100644 (file)
@@ -219,9 +219,9 @@ static void parse_args(struct pathspec *pathspec,
                }
        }
        *rev_ret = rev;
-       parse_pathspec(pathspec,
-                      patch_mode ? PATHSPEC_ALL_MAGIC & ~PATHSPEC_FROMTOP : 0,
-                      PATHSPEC_PREFER_FULL,
+       parse_pathspec(pathspec, 0,
+                      PATHSPEC_PREFER_FULL |
+                      (patch_mode ? PATHSPEC_PREFIX_ORIGIN : 0),
                       prefix, argv);
 }
 
@@ -299,7 +299,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}"));
-               return run_add_interactive(sha1_to_hex(sha1), "--patch=reset", pathspec.raw);
+               return run_add_interactive(sha1_to_hex(sha1), "--patch=reset", &pathspec);
        }
 
        /* git reset tree [--] paths... can be used to