git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Kågedal" <davidk@lysator.liu.se>
To: git@vger.kernel.org
Subject: Re: [RFD] Git glossary: 'branch' and 'head' description
Date: Fri, 19 May 2006 08:53:37 +0200	[thread overview]
Message-ID: <87y7wyv72m.fsf@morpheus.hq.vtech> (raw)
In-Reply-To: e4f1ta$e07$1@sea.gmane.org

Jakub Narebski <jnareb@gmail.com> writes:

> In #git channel somebody asked about 'branches' and 'heads' and was referred
> to the glossary. I had taken then a look at appropriate glossary entries.
>
> In 'Documentation/glossary.txt' we have:
> ----  
> branch::
>         A non-cyclical graph of revisions, i.e. the complete history of
>         a particular revision, which is called the branch head. The
>         branch heads are stored in `$GIT_DIR/refs/heads/`.

[...]

> It is just me or the glossary entry for `branch` is unnecessary 
> complicated? 
>
> Let's take a look at other definitions:
>
>   In software engineering, 'branch' is a separate line of development, which 
>   among others allows development on a project to diverge in two directions, 
>   such as a stable and a development version. (WikiPedia:Branch)
>
>   In the CVS team development environment, a separate line of development 
>   where changes can be isolated. When a programmer changes files on 
>   a branch, those changes do not appear on the main trunk 
>   or other branches. (cvs.info)
>
> So from the user's point of view, 'branch' is simply _named line of
> development_. Refer to topic and tracking branches.

But the definition of 'branch' in git is quite different from the
definition in CVS or many other systems.  It CVS, each revision
(commit) belongs to a branch, and the branch is a linear sequence of
revisions, not a full DAG.  In git, a commit doesn't really "belong"
in any specific branch.

So, while it makes sense to describe branches as "lines of
development" in general terms, it is also important to note the
specific meaning of 'branch' in the context of git; i.e. as the
history of a single head commit.

I noticed that some of this seems to be changing slightly with the
introduction of branch logs, but I don't know how those are supposed
to be used yet.

-- 
David Kågedal

  parent reply	other threads:[~2006-05-19  7:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-17 11:37 [RFD] Git glossary: 'branch' and 'head' description Jakub Narebski
2006-05-17 18:28 ` Junio C Hamano
2006-05-17 19:13   ` Jakub Narebski
2006-05-17 19:57     ` Junio C Hamano
2006-05-17 20:06       ` Jakub Narebski
2006-05-19  6:53 ` David Kågedal [this message]
2006-05-19  9:21   ` Shawn Pearce
2006-05-20  0:28     ` Daniel Barkalow
2006-05-20  0:35       ` Junio C Hamano
2006-05-20  1:36         ` Daniel Barkalow
2006-05-20  2:06           ` Linus Torvalds
2006-05-21  1:01             ` Shawn Pearce
2006-05-21  8:30   ` Jakub Narebski

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=87y7wyv72m.fsf@morpheus.hq.vtech \
    --to=davidk@lysator.liu.se \
    --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).