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

Re: git-reset and clones

From
Jon Loeliger <jdl@freescale.com>
Date
Mar 17, 2006, 21:00 UTC
Message-ID
<1142629202.17536.242.camel@cashmere.sps.mot.com>
In-Reply-To
<7vslpgztzc.fsf@assigned-by-dhcp.cox.net>
On Fri, 2006-03-17 at 14:39, Junio C Hamano wrote:
Show 6 quoted lines
> > And the "ours" strategy effectively says, "Favor the B
> > side of things when pulling in the A parts", right?
> 
> Yes, it is stronger than that.  "ours" says: "the tree from our
> head commit B *is* the resulting tree -- whatever we are merging
> into us does not matter".
Aha!  This all makes much more sense now suddenly.
Thank you.
Show 15 quoted lines
> 
>                   o---o---o---A---N
>                  /               /  
>      ---o---o---o---o---o---B---'
> 
> Because the forked track leading to B was either to fix mistakes
> or clean things up the upstream originally did in the track
> leading to A, the commits on the tracks leading to A and B from
> their fork point are almost guaranteed to have conflicting
> changes, and resolution of that conflict is forced on the
> downstream person.  Worse yet, from this point on, since the
> upstream discarded the track that contains A, the branch
> downstream person has will _never_ converge to upstream branch,
> even though the downstream person did _no_ development of his
> own in the meantime.  This is *B*A*D*.
Wow.  Yeah.  Bad.
> If there is a magic "ours" merge, the downstream person's
> repository records A as the last tip on the tracking branch, and
> git-fetch sees the updated head M is a descendant of it, so it
> simply fast-forwards:

That's beautiful. I get it. This has been an extraordinarily helpful explanation (for me)!

Thank you!
jdl
Previous: Junio C HamanoNext: Andreas Ericsson
Message 10 of 12 in “git-reset and clones”
  1. Paul JakmaMar 16, 2006
  2. seanMar 16, 2006
  3. Paul JakmaMar 16, 2006
  4. Andreas EricssonMar 16, 2006
  5. Andreas EricssonMar 16, 2006
  6. seanMar 16, 2006
  7. Junio C HamanoMar 17, 2006
  8. Jon LoeligerMar 17, 2006
  9. Junio C HamanoMar 17, 2006
  10. Jon LoeligerMar 17, 2006
  11. Andreas EricssonMar 17, 2006
  12. Petr BaudisMar 19, 2006

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.