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

Re: What is the scenario for a commit with 3 or more parents

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 29, 2010, 02:19 UTC
Message-ID
<20100729021946.GG25268@spearce.org>
In-Reply-To
<AANLkTikMRa_LrD2fU9Piv3GW2H0r7Jf_9s5iM0wc9t6s@mail.gmail.com>
Bradley Wagner <bradley.wagner@hannonhill.com> wrote:
Show 7 quoted lines
> I was reading over the Specifying Revisions section in the man entry
> gitrevisions. I understand having 2 parent commits with a merge.
> 
> I was trying to understand the HEAD^2 style syntax and wondering where
> HEAD^3 would be used. From the example diagram, this would be Commit B
> but I'm unclear how this would ever happen. Is this some kind of
> multi-way merge?
Yes.  Its called an octopus merge.  It happpens sometimes when
merging 2 or more otherwise fairly isolated changes in a single
shot.  E.g. `git merge feature-a feature-b thing-c`.
 
> Does git log show the parents in their ordinal order in the "Merge:" line?
Yes.
-- 
Shawn.
Previous: Bradley WagnerNext: Sverre Rabbelier
Message 2 of 9 in “What is the scenario for a commit with 3 or more parents”
  1. Bradley WagnerJul 29, 2010
  2. Shawn O. PearceJul 29, 2010
  3. Sverre RabbelierJul 29, 2010
  4. Bradley WagnerJul 29, 2010
  5. Joshua JuranJul 29, 2010
  6. Sverre RabbelierJul 29, 2010
  7. Junio C HamanoJul 29, 2010
  8. Sverre RabbelierJul 29, 2010
  9. Junio C HamanoJul 29, 2010

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.