Re: [PATCH] Use a temporary index for interactive git-commit
- From
Jeff King <peff@peff.net>
- Date
- Dec 30, 2010, 04:33 UTC
- Message-ID
- <20101230043355.GA24555@sigill.intra.peff.net>
- In-Reply-To
- <1293670038-8606-1-git-send-email-conrad.irwin@gmail.com>
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:
Show 9 quoted lines
> --- 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