summaryrefslogtreecommitdiff
path: root/builtin/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/add.c')
-rw-r--r--builtin/add.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/builtin/add.c b/builtin/add.c
index 1deb59a..0060162 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -194,12 +194,18 @@ int run_add_interactive(const char *revision, const char *patch_mode,
&use_builtin_add_i);
if (use_builtin_add_i == 1) {
+ enum add_p_mode mode;
+
if (!patch_mode)
return !!run_add_i(the_repository, pathspec);
- if (strcmp(patch_mode, "--patch"))
+
+ if (!strcmp(patch_mode, "--patch"))
+ mode = ADD_P_ADD;
+ else
die("'%s' not yet supported in the built-in add -p",
patch_mode);
- return !!run_add_p(the_repository, pathspec);
+
+ return !!run_add_p(the_repository, mode, revision, pathspec);
}
argv_array_push(&argv, "add--interactive");