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

Re: I think there is error in merge documents - current branch

From
Sergey Organov <sorganov@gmail.com>
Date
May 21, 2023, 12:23 UTC
Message-ID
<87zg5xq3es.fsf@osv.gnss.ru>
In-Reply-To
<xmqq353qk59y.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 29 quoted lines
> Minnie Shi <minnie.shi@gmail.com> writes:
>
>> in summary the sentence should be read as
>>
>> Before the operation, ORIG_HEAD is set to the tip of the current branch (H).
>> instead of
>> Before the operation, ORIG_HEAD is set to the tip of the current branch (C).
>
> Not C but G (i.e. the tip _before_ the history is updated).
>
> I notice that we overuse "current" there.  One is to refer to the
> most recent commit on a branch, the other is to refer to the branch
> that is checked out.  For the former, we say "the tip" in the other
> sentence, and it probably will make it less ambiguous if used that
> phrase.
>
>     Then "`git merge topic`" will replay the changes made on the
>     `topic` branch since it diverged from `master` (i.e., `E`) until
>     the commit at the tip of the `topic` (`C`) on top of `master`,
>     and record the result
>     in a new commit along with the names of the two parent commits and
>     a log message from the user describing the changes. Before the operation,
>     `ORIG_HEAD` is set to the tip of the current branch (`G`).
>
> My reading also hiccupped with "replay"; the first sentence to
> explain the command says "incorporate the changes", and that may be
> a less confusing expression; "replay" somehow makes me imagine that
> the changes are cherry-picked one by one---it may be only me, so I
> left it as-is in the suggestion above.

For me "apply changes" or even "apply cumulative changes" works much better than "replay changes" in this context, especially provided we will apparently have "git replay" soon.

Thanks, -- Sergey Organov

Previous: Kristoffer HaugsbakkNext: Minnie Shi
Message 7 of 9 in “I think there is error in merge documents - current branch”
  1. Minnie ShiMay 20, 2023
  2. doc: merge: fix mention of `ORIG_HEAD`Kristoffer Haugsbakk, May 20, 2023
  3. Minnie ShiMay 20, 2023
  4. Minnie ShiMay 20, 2023
  5. Junio C HamanoMay 20, 2023
  6. Kristoffer HaugsbakkMay 21, 2023
  7. Sergey OrganovMay 21, 2023
  8. Minnie ShiMay 21, 2023
  9. Minnie ShiMay 21, 2023

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.