git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Mike Hommey <mh@glandium.org>, git@vger.kernel.org
Subject: Re: error: cannot cherry-pick during a revert
Date: Thu, 29 Aug 2019 16:27:43 +0100	[thread overview]
Message-ID: <be3f951c-467d-68aa-592a-bdf77646fdbb@gmail.com> (raw)
In-Reply-To: <20190828232515.bvghqlwe3i7sie7n@glandium.org>

Hi Mike

On 29/08/2019 00:25, Mike Hommey wrote:
> Hi,
> 
> This just happened to me while cherry-pick'ing:
> 
> $ git cherry-pick HEAD@{1}
> error: could not apply 614fe5e629b84... try
> hint: after resolving the conflicts, mark the corrected paths
> hint: with 'git add <paths>' or 'git rm <paths>'
> hint: and commit the result with 'git commit'
> Recorded preimage for 'taskcluster/ci/build/linux.yml'
> 
> (... this is where I fix my conflict ...)
> 
> $ git add -u
> $ git cherry-pick --continue
> error: cannot cherry-pick during a revert.
> fatal: cherry-pick failed

Oh dear that's not good

> So apparently, cherry-pick thinks it was doing a revert when it hit a
> conflict?
> 
> (This is with git 2.23)

I wondered if this was due to some of the recent changes adding --skip 
to cherry-pick and revert but I can't see anything obvious at the 
moment. To get that error the sequencer has loaded a todo file (in 
read_populate_todo()) which starts with a revert command. Is it possible 
you were reverting a sequence of commits before you ran the cherry-pick? 
(a single pick or revert does not create a todo list). It could be that 
there was an old todo list left over from a while ago - historically the 
sequencer hasn't been all that good at cleaning up after itself if the 
user committed the final pick or revert with 'git commit' and forgot to 
run 'cherry-pick/revert --continue' afterwards.

Best Wishes

Phillip

> Mike
> 

      reply	other threads:[~2019-08-29 15:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28 23:25 error: cannot cherry-pick during a revert Mike Hommey
2019-08-29 15:27 ` Phillip Wood [this message]

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=be3f951c-467d-68aa-592a-bdf77646fdbb@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mh@glandium.org \
    --cc=phillip.wood@dunelm.org.uk \
    /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).