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

Re: [FIXED PATCH] Make rebase save ORIG_HEAD if changing current branch

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Jul 8, 2008, 03:24 UTC
Message-ID
<35BBB0D4-B3E1-4097-AF11-E0F6223125EA@silverinsanity.com>
In-Reply-To
<7vod591hlp.fsf@gitster.siamese.dyndns.org>
On Jul 7, 2008, at 5:58 PM, Junio C Hamano wrote:
Show 18 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
> And to answer your "git rebase --onto this from that-branch"  
> question, I
> think ORIG_HEAD should record the tip of that-branch before rebase  
> takes
> place, not the commit you happened to be at before running it.   
> Switching
> branch to that-branch is not the drastic and unforseeable part.  The
> drastic and unforseeable change is rebasing and seeing that the  
> rebased
> result does not work with the new upstream `from`, and the user  
> would want
> to have a way to quickly rewind the tip of the branch back to the  
> state
> before the rebase.  The new paragraph added by this patch should  
> hopefully
> make this reasoning more clear.

I just wanted to make sure there was a clear reasoning and to see if someone could word it clearly, as I was getting a little cross-eyed.

Show 6 quoted lines
> -- >8 --
> Documentation: update sections on naming revisions and revision ranges
>
> Various *_HEAD pseudo refs were not documented in any central place.
> Especially since we may be teaching rebase and am to record ORIG_HEAD,
> it would be a good time to do so.
My only objection is to the "may".  ;-)

Also, perhaps we should either list the commands that set ORIG_HEAD, or add a note to that effect in their manpages. I'll see what wording I can come up with, unless you (or someone else) gets to it first of course.

> While at it, reword the explanation on r1..r2 notation to reduce
> confusion.
Looks good.
~~ Brian
Previous: Jakub NarebskiNext: Brian Gernhardt
Message 18 of 28 in “Make rebase save ORIG_HEAD if changing current branch”
  1. Make rebase save ORIG_HEAD if changing current branchBrian Gernhardt, Jul 6, 2008
  2. Junio C HamanoJul 7, 2008
  3. Brian GernhardtJul 7, 2008
  4. Junio C HamanoJul 7, 2008
  5. Junio C HamanoJul 7, 2008
  6. Junio C HamanoJul 7, 2008
  7. Theodore TsoJul 7, 2008
  8. Jakub NarebskiJul 7, 2008
  9. Brian GernhardtJul 7, 2008
  10. Jeff KingJul 8, 2008
  11. Brian GernhardtJul 8, 2008
  12. Brian GernhardtJul 7, 2008
  13. Junio C HamanoJul 7, 2008
  14. Junio C HamanoJul 7, 2008
  15. Jakub NarebskiJul 7, 2008
  16. Junio C HamanoJul 7, 2008
  17. Jakub NarebskiJul 7, 2008
  18. Brian GernhardtJul 8, 2008
  19. Documentation: mention ORIG_HEAD in am, merge, and rebaseBrian Gernhardt, Jul 8, 2008
  20. Junio C HamanoJul 8, 2008
  21. Brian GernhardtJul 8, 2008
  22. Jay SoffianJul 8, 2008
  23. Mike HommeyJul 7, 2008
  24. Junio C HamanoJul 7, 2008
  25. Mike HommeyJul 7, 2008
  26. Nanako ShiraishiJul 7, 2008
  27. Re* [FIXED PATCH] Make rebase save ORIG_HEAD if changing current branchJunio C Hamano, Jul 7, 2008
  28. Brian GernhardtJul 7, 2008

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.