aboutsummaryrefslogtreecommitdiff
path: root/builtin/reset.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/reset.c')
-rw-r--r--builtin/reset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/reset.c b/builtin/reset.c
index 313b296ef..9bef869fe 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -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