git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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?
Previous: herr.kasteNext: herr.kaste
Message 8 of 15 in “rebase -i: fix ORIG_HEAD handling”
  1. 0/4 rebase -i: fix ORIG_HEAD handlingPhillip Wood via GitGitGadget, Oct 27, 2020
  2. 4/4 rebase -i: simplify get_revision_ranges()Phillip Wood via GitGitGadget, Oct 27, 2020
  3. 3/4 rebase -i: use struct object_id when writing statePhillip Wood via GitGitGadget, Oct 27, 2020
  4. 1/4 rebase -i: stop overwriting ORIG_HEAD bufferPhillip Wood via GitGitGadget, Oct 27, 2020
  5. Junio C HamanoOct 27, 2020
  6. Phillip WoodOct 31, 2020
  7. herr.kasteNov 2, 2020
  8. Junio C HamanoNov 3, 2020
  9. herr.kasteNov 3, 2020
  10. 2/4 rebase -i: use struct object_id rather than looking up commitPhillip Wood via GitGitGadget, Oct 27, 2020
  11. 0/4 rebase -i: fix ORIG_HEAD handlingPhillip Wood via GitGitGadget, Nov 4, 2020
  12. 1/4 rebase -i: stop overwriting ORIG_HEAD bufferPhillip Wood via GitGitGadget, Nov 4, 2020
  13. 3/4 rebase -i: use struct object_id when writing statePhillip Wood via GitGitGadget, Nov 4, 2020
  14. 4/4 rebase -i: simplify get_revision_ranges()Phillip Wood via GitGitGadget, Nov 4, 2020
  15. 2/4 rebase -i: use struct object_id rather than looking up commitPhillip Wood via GitGitGadget, Nov 4, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.