branch update Jonathan S. Shapiro (shap@eros-os.org)
Tue, 11 Apr 2000 19:03:18 -0400

Once all entities in the repository have universally unique names (I'm currently using SHA), there remains only one place (at the moment) that a central decision is required, which is when "human readable" names get bound.

For example, I presently have a "create project" command. It creates a new file, which is uniquely named by its SHA value. It's actually not too bad at the project level to allow redundant names, since name collisions won't happen all that often, and one can always browse the directory and extract the universally unique name from among the 3 or 4 different "EROS" projects (though I can imagine denial of service attacks here). As long as uniqueness isn't required, there is no need for central arbitration of project names.

For branches, however, there is a definite need. The reason is that "rebinding" the branch name is the fundamental atomic operation that occurs when a commit is done. Committing branch X may be thought of as:

assemble a new configuration
upload it
rebind branch name X to point to this configuration

I do not see a way to do this without having a single "transaction manager" for a given branch. It can be different for each branch (which is why local disconnected branches can work), but I don't see how to distribute the commit operation.

Am I missing something?

shap