Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 May 2023 17:41:33 +0000 (UTC)
From:      Matt Wheeler <m@funkyhat.org>
To:        Rick Macklem <rick.macklem@gmail.com>
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: what do I do when git cherry-pick works, but results are bogus?
Message-ID:  <CAG93HwGLZF0TTaNE3i2sNVKvKxSovHPeYM5w9SygJC%2BPFJx0pA@mail.gmail.com>
In-Reply-To: <CAM5tNy4dhJr=gTsTB7DYN9TXqa6TVA1pW9bF=h9sX32zEfwNTA@mail.gmail.com>
References:  <CAM5tNy4dhJr=gTsTB7DYN9TXqa6TVA1pW9bF=h9sX32zEfwNTA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000cbdd5205fbe73286
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

On Wed, 17 May 2023, 17:44 Rick Macklem, <rick.macklem@gmail.com> wrote:

> So, the subject line basically says it.
> I do a git cherry-pick to MFC. It works, but the resultant file(s) are not
> correct. What do I do to fix this?
> (If the merge fails, then it's easy, but there doesn't seem to be an option
>  on cherry-pick that forces it into "merge failed", so you can edit/add
> the file
>  and then "git cherry-pick --continue".)
>

If you're cherry-picking multiple commits then you can turn the problem
into a rebase

After the cherry-pick commits are created, then run

  git rebase -i <ref your branch is based on>

Then change the `i` at the start of the line for the broken commit to `e`
(edit) before saving the plan file

--000000000000cbdd5205fbe73286
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D=
"gmail_attr">On Wed, 17 May 2023, 17:44 Rick Macklem, &lt;<a href=3D"mailto=
:rick.macklem@gmail.com">rick.macklem@gmail.com</a>&gt; wrote:<br></div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #=
ccc solid;padding-left:1ex">So, the subject line basically says it.<br>
I do a git cherry-pick to MFC. It works, but the resultant file(s) are not<=
br>
correct. What do I do to fix this?<br>
(If the merge fails, then it&#39;s easy, but there doesn&#39;t seem to be a=
n option<br>
=A0on cherry-pick that forces it into &quot;merge failed&quot;, so you can =
edit/add the file<br>
=A0and then &quot;git cherry-pick --continue&quot;.)<br></blockquote></div>=
</div><div dir=3D"auto"><br></div><div dir=3D"auto">If you&#39;re cherry-pi=
cking multiple commits then you can turn the problem into a rebase=A0</div>=
<div dir=3D"auto"><br></div><div dir=3D"auto">After the cherry-pick commits=
 are created, then run=A0</div><div dir=3D"auto"><br></div><div dir=3D"auto=
">=A0 git rebase -i &lt;ref your branch is based on&gt;</div><div dir=3D"au=
to"><br></div><div dir=3D"auto">Then change the `i` at the start of the lin=
e for the broken commit to `e` (edit) before saving the plan file=A0</div><=
div dir=3D"auto"><br></div><div dir=3D"auto"><div class=3D"gmail_quote"><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #=
ccc solid;padding-left:1ex">
</blockquote></div></div></div>

--000000000000cbdd5205fbe73286--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG93HwGLZF0TTaNE3i2sNVKvKxSovHPeYM5w9SygJC%2BPFJx0pA>