Re: [PATCH 1/4] rebase -i: stop overwriting ORIG_HEAD buffer
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 3, 2020, 00:21 UTC
- Message-ID
- <xmqqpn4vqogu.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CAFzd1+7wzPZa9brWzWzSQdcMEnbEcV28zqBBAV_rsdsKNaKaFg@mail.gmail.com>
"herr.kaste" <herr.kaste@gmail.com> writes:
> Phillip pointed out that ORIG_HEAD is actually not save *if* there is
> a `reset` or `rebase --skip` during the rebase. Otherwise, by design,
> ORIG_HEAD would be easier to use, as in the form `<branch_name>@{<n>}`
> two things have to be decided and can go wrong.What "two"? You should be able to just say @{1} regardless---that was the whole point of performing all the intermediate steps while on the detached HEAD so that you can rely on <n> being 1, and @{<num or time>} is a short-hand of <branch>@{<num or time>} for the current branch, and not a short-hand for HEAD@{...}, to help such a use case.
Or am I missing something?