[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Comparison of Monotone and git
From: |
Bruce Stephens |
Subject: |
Re: [Monotone-devel] Comparison of Monotone and git |
Date: |
Thu, 19 Jun 2008 09:54:57 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Matthew Nicholson <address@hidden> writes:
[...]
> I like the idea of local branch namespaces. How do they implement it?
> Just use like the sha1 hash of various things as the true branch name
> and then map that to a texual name locally?
No. commits don't contain any branch information. commits form a DAG
(because they contain reference to their parents). A branch is a ref
to the head of the branch. It can be a simple file, for example
.git/refs/heads/master might contain the text
0bea2424197ef0c389a153aa968dc884e71d1638.
So branches can't have multiple heads. And whether a commit belongs
to some branch is a local question---the commit itself belongs to a
DAG, but which branches exist and what they're called is local.
(For efficiency these refs can be packed into larger files---having
lots of small files would slow things down.)