aboutsummaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index 4de316a36..5d27102a6 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -157,7 +157,7 @@ static void add_remove_files(struct path_list *list)
}
}
-static char *prepare_index(const char **files, const char *prefix)
+static char *prepare_index(int argc, const char **argv, const char *prefix)
{
int fd;
struct tree *tree;
@@ -165,7 +165,7 @@ static char *prepare_index(const char **files, const char *prefix)
const char **pathspec = NULL;
if (interactive) {
- interactive_add();
+ interactive_add(argc, argv);
commit_style = COMMIT_AS_IS;
return get_index_file();
}
@@ -173,8 +173,8 @@ static char *prepare_index(const char **files, const char *prefix)
if (read_cache() < 0)
die("index file corrupt");
- if (*files)
- pathspec = get_pathspec(prefix, files);
+ if (*argv)
+ pathspec = get_pathspec(prefix, argv);
/*
* Non partial, non as-is commit.
@@ -578,7 +578,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
argc = parse_and_validate_options(argc, argv);
- index_file = prepare_index(argv, prefix);
+ index_file = prepare_index(argc, argv, prefix);
commitable = run_status(stdout, index_file, prefix);
@@ -670,7 +670,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
argc = parse_and_validate_options(argc, argv);
- index_file = prepare_index(argv, prefix);
+ index_file = prepare_index(argc, argv, prefix);
if (!no_verify && run_hook(index_file, "pre-commit", NULL)) {
rollback_index_files();