git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Conrad Irwin <conrad.irwin@gmail.com>
Cc: git@vger.kernel.org, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Subject: Re: [PATCH] Use a temporary index for interactive git-commit
Date: Wed, 29 Dec 2010 23:33:55 -0500	[thread overview]
Message-ID: <20101230043355.GA24555@sigill.intra.peff.net> (raw)
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:

> --- 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

  parent reply	other threads:[~2010-12-30  4:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-30  0:47 [PATCH] Use a temporary index for interactive git-commit Conrad Irwin
2010-12-30  2:51 ` Jonathan Nieder
2010-12-30  4:33 ` Jeff King [this message]
2010-12-30 12:41   ` Conrad Irwin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101230043355.GA24555@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=conrad.irwin@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).