Re: [PATCH] Use a temporary index for interactive git-commit
From: Jeff King <hidden>
Date: 2016-06-15 22:50:19
On Thu, Dec 30, 2010 at 12:47:18AM +0000, Conrad Irwin wrote:
Hitherto even an aborted git commit -p or git commit --interactive has added the selected changes to the index.
Hmm. I see how it could be confusing if you do ^C in "git commit -p" and it actually commits what you had staged. But if I am reading the patch right here:
quoted hunk ↗ jump to hunk
--- a/builtin/add.c +++ b/builtin/add.c@@ -378,7 +386,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, patch_interactive)); + exit(interactive_add(argc - 1, argv + 1, prefix, patch_interactive, NULL));
this behavior will not apply to "git add -p". So doesn't that introduce a new confusing inconsistency, that ^C from "git commit -p" abandons changes entirely, but from "git add -p" will silently stage changes? -Peff