public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jay Soffian <jaysoffian@gmail•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, 05 Oct 2011 16:03:05 -0700	[thread overview]
Message-ID: <7v62k359ee.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAG+J_Dysix9fOCuvm5+aU7-AC4wmsxH4-MOX+yhaHEqzeN1cPg@mail.gmail.com> (Jay Soffian's message of "Wed, 5 Oct 2011 18:23:36 -0400")

Jay Soffian <jaysoffian@gmail•com> writes:

> 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().

As a general direction, I think it makes tons of sense ot delay writing
out these state files before you really commit that the user will be in
the cherry-pick (or revert) sequence.

I am not sure if do_pick_commit() is the best place to do so. Wouldn't it
be necessary to special case the first round at least? The pick can fail
in one of two ways:

 - It does not even start. This is the case I illustrated in the earlier
   message, and we do not want to leave sequencer state.

 - It stops with conflict. At this point, it probably is OK to say that
   the user is committed to go with the sequencer flow and the next step
   would be to help Git resolve conflicts and proceed, and in this case we
   do want the sequencer state.

And once we picked/reverted at least one commit, if there are more, the
user knows the sequencer flow is in progress, and it is perfectly fine to
see the error message from "commit --amend".

It's just the "commit --amend" message that says I cannot amend felt
utterly out of place, immediately after seeing "cherry-pick" that tried to
pick only one commit did _not_ even start.

  parent reply	other threads:[~2011-10-05 23:03 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
2011-10-05 22:32         ` Junio C Hamano
2011-10-06  0:08           ` Jay Soffian
2011-10-05 23:03         ` Junio C Hamano [this message]
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=7v62k359ee.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jaysoffian@gmail$(echo .)com \
    --cc=nicolas.dichtel@6wind$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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