git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Björn Steinbrink" <B.Steinbrink@gmx.de>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Dmitry Potapov <dpotapov@gmail.com>,
	Michael J Gruber <git@drmicha.warpmail.net>,
	git@vger.kernel.org
Subject: Re: What are branches?
Date: Fri, 24 Apr 2009 15:08:05 +0200	[thread overview]
Message-ID: <200904241508.08569.jnareb@gmail.com> (raw)
In-Reply-To: <20090420202329.GB17241@atjola.homenet>

On Mon, 20 April 2009, Björn Steinbrink wrote:
> On 2009.04.20 11:59:38 -0700, Jakub Narebski wrote:
> > Björn Steinbrink <B.Steinbrink@gmx.de> writes:
> > 
> > > If you go out, and look at a tree lit-up by the evil daystar, branches
> > > start at the trunk and end at their tip. The trunk isn't part of the
> > > branch.  [...]
> > 
> > Well, you have to remember that the 'branch' metaphor should not be
> > taken too literaly; take for example merges which do not have
> > equivalent in a tree build.
> 
> True, but that just happened to fit the task-oriented branch view so
> well, and I wanted the reference to the evil daystar (obviously ;-)).

Also in (botanical) trees you can usually distinguish between trunk
and side branches, and I think in most cases also which branch forked
from which one.  Making one of branches (trunk) special might make
sense for centralized version control systems like CVS (1.2 vs 1.2.2.4
version numbers) or Subversion (<project>/trunk for trunk (main branch)
vs <project>/branches/<branchname>; although this is only convention
and is not enforced by the tool), but in my opinion contradicts
distributed nature of distributed SCM such like Git (and Mercurial).

> > But if we are talking about literal branches: take a closer loog at
> > the tip of tree (plant) branch.  You can find growong tip there
> > (apical meristem) where new cells grow.  In Git you have 'branches'
> > (branch heads) where you create new commits...
> 
> Yeah, see the end of my mail, where I said that git has a mechanism to
> control where branches grow. Seems to fit :-)

The difference is that you can (usually) see which branch was first.
It is not the case for Git (and it wouldn't make sense, as for DSCM
there is no sense of 'first' wrt. time).

> > But I agree that there isn't for example true notion of 'trunk' in
> > git, and this is what allows Git to be truly distributed...
> 
> Hm, not just no trunk, but also no branches that have a starting point
> and an end point. In general, you can't say "My branch starts _here_"
> unless you use the root commit(s) as the starting point, or you apply
> "extra" knowledge (you know from which other branch this branch forked).

Well, you can use reflog... if it is not expired.  Or the tracking info
in a config.

-- 
Jakub Narebski
Poland

  reply	other threads:[~2009-04-24 13:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-19 15:17 What are branches? Johannes Schindelin
2009-04-19 15:24 ` Michael Witten
2009-04-19 22:10 ` Tuncer Ayaz
2009-04-19 22:29   ` Johannes Schindelin
2009-04-19 22:34     ` Tuncer Ayaz
2009-04-20 11:32 ` Dmitry Potapov
2009-04-20 12:07   ` Michael J Gruber
2009-04-20 13:24     ` Dmitry Potapov
2009-04-20 13:52       ` Michael J Gruber
     [not found]         ` <200904201614.07735.fge@one2team.com>
2009-04-20 14:27           ` Michael J Gruber
2009-04-20 18:40         ` Dmitry Potapov
2009-04-20 20:58           ` Junio C Hamano
2009-04-20 22:08             ` Marius Vollmer
2009-04-21  0:53               ` Junio C Hamano
2009-04-21 11:41             ` Dmitry Potapov
2009-04-20 14:25       ` Johannes Schindelin
2009-04-20 16:06         ` Björn Steinbrink
2009-04-20 18:59           ` Jakub Narebski
2009-04-20 20:23             ` Björn Steinbrink
2009-04-24 13:08               ` Jakub Narebski [this message]
2009-04-24 16:29                 ` Björn Steinbrink
2009-04-20 18:47         ` Dmitry Potapov
2009-04-20 19:19           ` Johannes Schindelin
2009-04-20 19:24             ` Michał Kiedrowicz
2009-04-20 20:16             ` Dmitry Potapov
2009-04-20 21:04           ` Björn Steinbrink
2009-04-20 16:13       ` Brian Gernhardt
2009-04-25 11:11 ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200904241508.08569.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=B.Steinbrink@gmx.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=dpotapov@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).