diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-12-04 21:38:28 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-04 21:38:28 -0800 |
commit | ab7d70766963e1e854a1edcbb0b840242330a7cb (patch) | |
tree | 2163e3f8d1c9bbd6715239f0bbf29e8a5a0d47bc /builtin-commit.c | |
parent | 31cbb5d96151891491168d3f813e6898c9ef825b (diff) | |
parent | 7e018be2ada073c92da59eb41442cde22c0c2796 (diff) | |
download | git-ab7d70766963e1e854a1edcbb0b840242330a7cb.tar.gz |
Merge branch 'wc/add-i'
* wc/add-i:
git-add -i: add help text for list-and-choose UI
add -i: allow prefix highlighting for "Add untracked" as well.
Highlight keyboard shortcuts in git-add--interactive
Document all help keys in "git add -i" patch mode.
Add "--patch" option to git-add--interactive
add -i: Fix running from a subdirectory
builtin-add: fix command line building to call interactive
git-add -i: allow multiple selection in patch subcommand
Add path-limiting to git-add--interactive
Teach builtin-add to pass multiple paths to git-add--interactive
Diffstat (limited to 'builtin-commit.c')
-rw-r--r-- | builtin-commit.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin-commit.c b/builtin-commit.c index e635d9963b..2ec8223132 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -163,7 +163,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; @@ -171,7 +171,7 @@ static char *prepare_index(const char **files, const char *prefix) const char **pathspec = NULL; if (interactive) { - interactive_add(); + interactive_add(argc, argv, prefix); commit_style = COMMIT_AS_IS; return get_index_file(); } @@ -179,8 +179,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. @@ -603,7 +603,7 @@ int cmd_status(int argc, const char **argv, const char *prefix) argc = parse_and_validate_options(argc, argv, builtin_status_usage); - index_file = prepare_index(argv, prefix); + index_file = prepare_index(argc, argv, prefix); commitable = run_status(stdout, index_file, prefix); @@ -703,7 +703,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix) argc = parse_and_validate_options(argc, argv, builtin_commit_usage); - 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(); |