Re: [RFD] Git glossary: 'branch' and 'head' description

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Kågedal wrote:

> Jakub Narebski <jnareb@xxxxxxxxx> writes:
[...]
>> 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.

We can always say that branch is 1-st parent linear history of head branch,
up to unmarked but computable branching/fork/creation point, i.e.

  {i = 0..N: branch-head~i}

where N is the length of the branch.

BTW. HEAD~0 == HEAD, isn't it?

-- 
Jakub Narebski
Warsaw, Poland

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]