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

Re: [PATCH] Documentation: mention ORIG_HEAD in am, merge, and rebase

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Jul 8, 2008, 19:28 UTC
Message-ID
<4104DCD7-23D2-436E-8599-B2EB95EBD926@silverinsanity.com>
In-Reply-To
<7vmykstc1h.fsf@gitster.siamese.dyndns.org>
On Jul 8, 2008, at 3:23 PM, Junio C Hamano wrote:
Show 24 quoted lines
> Brian Gernhardt <benji@silverinsanity.com> writes:
>
>> diff --git a/Documentation/git-rebase.txt b/Documentation/git- 
>> rebase.txt
>> index f3459c7..37382c4 100644
>> --- a/Documentation/git-rebase.txt
>> +++ b/Documentation/git-rebase.txt
>> @@ -26,7 +26,8 @@ of commits that would be shown by `git log  
>> <upstream>..HEAD`.
>>
>> The current branch is reset to <upstream>, or <newbase> if the
>> --onto option was supplied.  This has the exact same effect as
>> -`git reset --hard <upstream>` (or <newbase>).
>> +`git reset --hard <upstream>` (or <newbase>).  This includes setting
>> +ORIG_HEAD to the pre-rebase tip of the branch.
>>
>> The commits that were previously saved into the temporary area are
>> then reapplied to the current branch, one by one, in order. Note that
>
> I found the above "This includes" part very hard to understand ---  
> it took
> me three re-reads to connect "This" and "the exact same effect".  Is  
> it
> just me?

I thought it perfectly easy to understand. ;-) But of course, I wrote it. I also wrote it immediately after reading the git-reset manual, which is why I phrased it that way. On a fresh read, it's less obvious.

Show 7 quoted lines
> I wonder if this is easier to understand:
>
>        The current branch is reset to <upstream>, or <newbase> if the
>        --onto option was supplied.  This has the exact same effect as
>        `git reset --hard <upstream>` (or <newbase>).  ORIG_HEAD is set
>        to point at the tip of the branch before this resetting  
> happens.

I might say "before the reset" instead of "before this resetting happens", as I find the latter slightly awkward. But that's a minor nit

~~ Brian
Previous: Junio C HamanoNext: Jay Soffian
Message 21 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.