aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/reset.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-02-15 17:11:53 -0800
committerJunio C Hamano <gitster@pobox.com>2023-02-15 17:11:53 -0800
commit06bca9708ac86d286a6f5265ff0e6c532f44c657 (patch)
treeb334bef2db6fa40422d14aadbbac3f1a4e18acfa /builtin/reset.c
parentc5f7b2a6fe34bbdd4453be6620e08dbcf1b695fb (diff)
parent5a7d41d849290ceadb02487ec962c5a040391535 (diff)
downloadgit-06bca9708ac86d286a6f5265ff0e6c532f44c657.tar.gz
Merge branch 'ab/retire-scripted-add-p'
Finally retire the scripted "git add -p/-i" implementation and have everybody use the one reimplemented in C. * ab/retire-scripted-add-p: docs & comments: replace mentions of "git-add--interactive.perl" add API: remove run_add_interactive() wrapper function add: remove "add.interactive.useBuiltin" & Perl "git add--interactive"
Diffstat (limited to 'builtin/reset.c')
-rw-r--r--builtin/reset.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/reset.c b/builtin/reset.c
index fea20a9ba0..4b59aa9aea 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -26,6 +26,7 @@
#include "submodule.h"
#include "submodule-config.h"
#include "dir.h"
+#include "add-interactive.h"
#define REFRESH_INDEX_DELAY_WARNING_IN_MS (2 * 1000)
@@ -390,7 +391,8 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
if (reset_type != NONE)
die(_("options '%s' and '%s' cannot be used together"), "--patch", "--{hard,mixed,soft}");
trace2_cmd_mode("patch-interactive");
- return run_add_interactive(rev, "--patch=reset", &pathspec);
+ return !!run_add_p(the_repository, ADD_P_RESET, rev,
+ &pathspec);
}
/* git reset tree [--] paths... can be used to