From: Philippe Blain <levraiphilippeblain@gmail.com>
To: phillip.wood@dunelm.org.uk, Erik Cervin Edin <erik@cervined.in>
Cc: git@vger.kernel.org
Subject: Re: bug?: ORIG_HEAD incorrect after reset during git-rebase -i
Date: Sat, 7 Jan 2023 12:06:15 -0500 [thread overview]
Message-ID: <1b2b8e98-5506-a1e6-6059-a967757b3bb8@gmail.com> (raw)
In-Reply-To: <81218256-5354-4b0a-6f74-7e9605131968@dunelm.org.uk>
Hi Phillip,
Le 2023-01-06 à 09:29, Phillip Wood a écrit :
> Hi Philippe & Erik
>
> On 05/01/2023 00:11, Philippe Blain wrote:
>> Hi Phillip and Erik,
>>
>> Le 2021-12-16 à 11:44, Erik Cervin Edin a écrit :
>>> Hi Phillip,
>>>
>>> Yes, I know.
>>> It's just that I was under the impression ORIG_HEAD was to be reverted
>>> to .git/rebase-merge/orig-head at the finish of the rebase.
>>> Personally, it's the behavior I would expect.
>>>
>>> Thanks for the tips.
>>
>> I just hit the same bug (I think it qualifies as one). In fact git-rebase(1) explicitely mentions
>> that ORIG_HEAD is set to the branch tip before the rebase starts:
>
> Strictly speaking that is what we do so we're documentation the
> implemented behavior. What's not clear from the documentation is that
> if the user run 'git reset' while rebasing then ORIG_HEAD will be
> overwritten.
Yes, I agree. I think we could highlight it in the doc.
> We could update ORIG_HEAD at the end of the rebase as
> you suggested but I wouldn't be surprised if some else complains that
> ORIG_HEAD no longer points to the commit that the reset while running
> rebase. I also wonder if users would expect 'git rebase --continue'
> to update ORIG_HEAD to point to the pre-rebase HEAD so it is
> consistent each time rebase stops. Basically I think the situation is
> confusing and I don't have a clear idea as to how to make it better.
> If someone submits a patch to try and clean things up I'll happily
> look at it but unless I'm hit by a bright idea as to how to fix it I
> probably wont work on it myself.
Thanks for your thoughts. I think you make good points, it's true that
some people might be relying on the current behaviour.
I'll try to send a few updates to the doc to make this hopefully clearer.
Cheers,
Philippe.
next prev parent reply other threads:[~2023-01-07 17:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 14:30 bug?: ORIG_HEAD incorrect after reset during git-rebase -i Erik Cervin Edin
2021-12-16 16:27 ` Phillip Wood
2021-12-16 16:44 ` Erik Cervin Edin
2023-01-05 0:11 ` Philippe Blain
2023-01-06 14:29 ` Phillip Wood
2023-01-07 17:06 ` Philippe Blain [this message]
2023-01-07 19:50 ` Philippe Blain
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=1b2b8e98-5506-a1e6-6059-a967757b3bb8@gmail.com \
--to=levraiphilippeblain@gmail.com \
--cc=erik@cervined.in \
--cc=git@vger.kernel.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).