diff options
author | Conrad Irwin <conrad.irwin@gmail.com> | 2011-05-07 10:58:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-09 17:02:33 -0700 |
commit | b4bd466820ee272fccfefff1d23d64c7826d1d07 (patch) | |
tree | 63794ec626b75e5de03a95177d98094dcfe2ba7d /builtin/add.c | |
parent | e41fcfe955cb8080bf8f0e16352d3131d1f01ac8 (diff) | |
download | git-b4bd466820ee272fccfefff1d23d64c7826d1d07.tar.gz |
Add support for -p/--patch to git-commit
The --interactive flag is already shared by git add and git commit,
share the -p and --patch flags too.
Signed-off-by: Conrad Irwin <conrad.irwin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/add.c')
-rw-r--r-- | builtin/add.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/add.c b/builtin/add.c index d39a6ab930..f02524bae0 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -241,7 +241,7 @@ int run_add_interactive(const char *revision, const char *patch_mode, return status; } -int interactive_add(int argc, const char **argv, const char *prefix) +int interactive_add(int argc, const char **argv, const char *prefix, int patch) { const char **pathspec = NULL; @@ -252,7 +252,7 @@ int interactive_add(int argc, const char **argv, const char *prefix) } return run_add_interactive(NULL, - patch_interactive ? "--patch" : NULL, + patch ? "--patch" : NULL, pathspec); } @@ -377,7 +377,7 @@ int cmd_add(int argc, const char **argv, const char *prefix) if (patch_interactive) add_interactive = 1; if (add_interactive) - exit(interactive_add(argc - 1, argv + 1, prefix)); + exit(interactive_add(argc - 1, argv + 1, prefix, patch_interactive)); if (edit_interactive) return(edit_patch(argc, argv, prefix)); |