git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Soffian <jaysoffian@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, nicolas.dichtel@6wind.com
Subject: Re: git-cherry-pick and git-commit --amend in version 1.7.6.4
Date: Wed, 5 Oct 2011 18:23:36 -0400	[thread overview]
Message-ID: <CAG+J_Dysix9fOCuvm5+aU7-AC4wmsxH4-MOX+yhaHEqzeN1cPg@mail.gmail.com> (raw)
In-Reply-To: <7vpqib5ciw.fsf@alter.siamese.dyndns.org>

On Wed, Oct 5, 2011 at 5:55 PM, Junio C Hamano <gitster@pobox.com> wrote:
> I think the sequencer state needs to be removed when the command aborts.

Or written later in do_pick_commit().

> This needs to be fixed before 1.7.7.1.

Something like this?

diff --git i/builtin/revert.c w/builtin/revert.c
index 3117776c2c..f7fcc88871 100644
--- i/builtin/revert.c
+++ w/builtin/revert.c
@@ -384,6 +384,7 @@ static int do_pick_commit(void)
 	char *defmsg = NULL;
 	struct strbuf msgbuf = STRBUF_INIT;
 	int res;
+	int record_cherry_pick_head = 0;

 	if (no_commit) {
 		/*
@@ -477,7 +478,7 @@ static int do_pick_commit(void)
 			strbuf_addstr(&msgbuf, ")\n");
 		}
 		if (!no_commit)
-			write_cherry_pick_head();
+			record_cherry_pick_head = 1;
 	}

 	if (!strategy || !strcmp(strategy, "recursive") || action == REVERT) {
@@ -514,6 +515,9 @@ static int do_pick_commit(void)
 	free_message(&msg);
 	free(defmsg);

+	if (record_cherry_pick_head)
+		write_cherry_pick_head();
+
 	return res;
 }

  reply	other threads:[~2011-10-05 22:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05 14:52 git-cherry-pick and git-commit --amend in version 1.7.6.4 Nicolas Dichtel
2011-10-05 16:50 ` Jay Soffian
2011-10-06  7:37   ` Nicolas Dichtel
2011-10-06  7:53     ` Nicolas Dichtel
2011-10-06 13:09     ` Jay Soffian
2011-10-06 13:22       ` Nicolas Dichtel
2011-10-06 13:44         ` Jay Soffian
2011-10-05 17:40 ` Junio C Hamano
2011-10-05 17:43   ` Jay Soffian
2011-10-05 21:55     ` Junio C Hamano
2011-10-05 22:23       ` Jay Soffian [this message]
2011-10-05 22:32         ` Junio C Hamano
2011-10-06  0:08           ` Jay Soffian
2011-10-05 23:03         ` Junio C Hamano
2011-10-05 23:42           ` Junio C Hamano
2011-10-06  7:06         ` Junio C Hamano

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=CAG+J_Dysix9fOCuvm5+aU7-AC4wmsxH4-MOX+yhaHEqzeN1cPg@mail.gmail.com \
    --to=jaysoffian@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nicolas.dichtel@6wind.com \
    /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).