From: Linus Torvalds Date: Fri, 18 Nov 2005 17:25:45 GMT Subject: Re: [RFC] Applying a graft to a tree and "rippling" the changes through Message-ID: In-Reply-To: <437DDDB1.60103@b-i-t.de> On Fri, 18 Nov 2005, sf wrote: > > I would go even further: The resulting tree does not depend on anything. A > tree is a tree is a tree. Agreed. > A commit is really just the statement: "I changed the tree from state A to > state B". After all, the commit message does not describe the new state > (neither the old state) but does describe the changes. No. A commit is _not_ just the statement of change between two trees. It's a statement of _history_ of the resulting tree. This is important. It's why a commit does not just point to the previous tree, but to the previous commit(s). And that's really important. If you don't have a history of what has happened, then all the trees are just random collections of files. They're not a project any more. So a commit doesn't just say "tree A changed into tree B". It very much says something much much stronger, which includes how you got to A in the first place. The history is also what allow a commit to be meaningful. Without that history, you could never say "I fixed the bug that was introduced by xyz", which is often a very integral part of _why_ the change happened. There are lots of changelog entries that don't necessarily make sense without knowing what went before them, so history is actually important even in a local sense - it's often what allows the explanation to make sense. Linus