Re: Git's database structure
From: Andreas Ericsson <hidden>
Date: 2016-06-15 22:43:33
Mike Hommey wrote:
On Tue, Sep 04, 2007 at 05:55:16PM +0200, Andreas Ericsson [off-list ref] wrote:quoted
Each root tree can only ever belong to a single commit, unless you intentionally force git to make completely empty commits. git won't complain about this, so long as you don't make two in the same second, because it relies more heavily on the DAG than on developer sanity.Actually, you don't need to be insane to have multiple commits pointing at the same root tree. It is actually very easy: - git clone - do some stuff on your master branch and commit - send your changes upstream - upstream applies as is - git pull You now have everything merged, and the last commit on your master branch, while being a different commit object due to its parenting, has the same root tree as the tip of the remote branch.
That explains why it felt so awkward writing that sentence. :) Thanks for correcting me. Even so, one more M<->M relation-ship certainly speaks for rather than against the current model. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231