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

Re: What are branches?

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Apr 21, 2009, 11:41 UTC
Message-ID
<20090421114155.GK25059@dpotapov.dyndns.org>
In-Reply-To
<7viqkzdoua.fsf@gitster.siamese.dyndns.org>
On Mon, Apr 20, 2009 at 01:58:37PM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> 
> However, especially after I fast-forward my branch tip to M and continue
> building on it, it is more useful to treat Dscho's topic as the side
> branch that was merged to my mainline that had your patches, for the
> purpose of most people.  Your "first parent" rule does not match that
> expectation.

Yes, it does not work here. However, fast-forward merge is not a real merge (though it is often very useful, because it avoids useless commits, yet, it is clearly Git specific thing). Still, what you describe is not very like to happen in practice, because it usually takes some time for any branch to "graduate" to master, and in meanwhile some other branches get merged, so it is not very likely to be fast-forward (and some people always prefer to merge anything to master with --no-ff).

Show 5 quoted lines
> 
> If we made it easy for Dscho to create the merge M to record my tree as
> the first parent, you _could_ make the "first parent" rule to be more
> meaningful than it currently is, but without it, it still is merely one of
> the heuristics as people suggested in this discussion.

Agreed. It is merely a heuristic unless it is not reinforced (like using --no-ff merges to master), but still it is a very good heuristic for most practical purposes, and it even can be improved based on merge messages.

Dmitry
Previous: Junio C HamanoNext: Johannes Schindelin
Message 14 of 28 in “What are branches?”
  1. Johannes SchindelinApr 19, 2009
  2. Michael WittenApr 19, 2009
  3. Tuncer AyazApr 19, 2009
  4. Johannes SchindelinApr 19, 2009
  5. Tuncer AyazApr 19, 2009
  6. Dmitry PotapovApr 20, 2009
  7. Michael J GruberApr 20, 2009
  8. Dmitry PotapovApr 20, 2009
  9. Michael J GruberApr 20, 2009
  10. Dmitry PotapovApr 20, 2009
  11. Junio C HamanoApr 20, 2009
  12. Marius VollmerApr 20, 2009
  13. Junio C HamanoApr 21, 2009
  14. Dmitry PotapovApr 21, 2009
  15. Johannes SchindelinApr 20, 2009
  16. Björn SteinbrinkApr 20, 2009
  17. Jakub NarebskiApr 20, 2009
  18. Björn SteinbrinkApr 20, 2009
  19. Jakub NarebskiApr 24, 2009
  20. Björn SteinbrinkApr 24, 2009
  21. Dmitry PotapovApr 20, 2009
  22. Johannes SchindelinApr 20, 2009
  23. Michał KiedrowiczApr 20, 2009
  24. Dmitry PotapovApr 20, 2009
  25. Björn SteinbrinkApr 20, 2009
  26. Brian GernhardtApr 20, 2009
  27. Felipe ContrerasApr 25, 2009
  28. Michael J GruberApr 20, 2009

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.