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

[PATCH 0/4] Fix ORIG_HEAD behavior of the built-in rebase

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 28, 2019, 15:27 UTC
Message-ID
<pull.153.git.gitgitgadget@gmail.com>

It was reported by Nazri Ramliy that ORIG_HEAD was set incorrectly again, this time caused by the shortcut to call git am directly, without detouring to a Unix shell script.

Patch 2/4 might look like something completely unrelated, but without it, the update to HEAD might use an incorrect reflog message.

Patch 1/4 is more a "while at it" patch; while looking which code paths might need to update ORIG_HEAD, I noticed that this reset_head() call did unnecessary work.

Johannes Schindelin (4):
  built-in rebase: no need to check out `onto` twice
  built-in rebase: use the correct reflog when switching branches
  built-in rebase: demonstrate that ORIG_HEAD is not set correctly
  built-in rebase: set ORIG_HEAD just once, before the rebase
 builtin/rebase.c  | 37 +++++++++++++++++++++----------------
 t/t3400-rebase.sh |  8 ++++++++
 2 files changed, 29 insertions(+), 16 deletions(-)
base-commit: 21853626eac565dd42572d90724b29863f61eb3b
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-153%2Fdscho%2Frebase-am-and-orig-head-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-153/dscho/rebase-am-and-orig-head-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/153
-- 
gitgitgadget
Next: Johannes Schindelin via GitGitGadget
Message 1 of 16 in “Fix ORIG_HEAD behavior of the built-in rebase”
  1. 0/4 Fix ORIG_HEAD behavior of the built-in rebaseJohannes Schindelin via GitGitGadget, Feb 28, 2019
  2. 3/4 built-in rebase: demonstrate that ORIG_HEAD is not set correctlyJohannes Schindelin via GitGitGadget, Feb 28, 2019
  3. 4/4 built-in rebase: set ORIG_HEAD just once, before the rebaseJohannes Schindelin via GitGitGadget, Feb 28, 2019
  4. 2/4 built-in rebase: use the correct reflog when switching branchesJohannes Schindelin via GitGitGadget, Feb 28, 2019
  5. 1/4 built-in rebase: no need to check out `onto` twiceJohannes Schindelin via GitGitGadget, Feb 28, 2019
  6. Phillip WoodFeb 28, 2019
  7. Johannes SchindelinMar 1, 2019
  8. Phillip WoodMar 1, 2019
  9. Junio C HamanoMar 3, 2019
  10. Johannes SchindelinMar 3, 2019
  11. Phillip WoodMar 3, 2019
  12. 0/4 Fix ORIG_HEAD behavior of the built-in rebaseJohannes Schindelin via GitGitGadget, Mar 3, 2019
  13. 1/4 built-in rebase: no need to check out `onto` twiceJohannes Schindelin via GitGitGadget, Mar 3, 2019
  14. 2/4 built-in rebase: use the correct reflog when switching branchesJohannes Schindelin via GitGitGadget, Mar 3, 2019
  15. 3/4 built-in rebase: demonstrate that ORIG_HEAD is not set correctlyJohannes Schindelin via GitGitGadget, Mar 3, 2019
  16. 4/4 built-in rebase: set ORIG_HEAD just once, before the rebaseJohannes Schindelin via GitGitGadget, Mar 3, 2019

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.