Re: commit-id fails after cg-init
- From
- H. Peter Anvin <hpa@zytor.com>
- Date
- May 4, 2005, 15:45 UTC
- Message-ID
- <4278EE20.8080004@zytor.com>
- In-Reply-To
- <4278E6D4.6060807@dwheeler.com>
David A. Wheeler wrote:
Show 18 quoted lines
> Joel Becker said: > >> Well, cg-init in this case creates no objects. I'd say, >> instead, it should create an empty tree object (representing a project >> with no files) and commit that. That would be your initial commit, and >> would put something valid in heads/master. > > That would actually make sense; commits would go all the way > back to the "empty tree" as the ultimate initial tree. > > There's an interesting side-effect of this; I _think_ it's > fine but it might be worth thinking through. If all > new projects start with an empty tree, that creates a > "common root" that all projects can appeal to. > That means that in theory a merge between any two project root > trees can eventually find a common ancestor: the empty tree. > I _think_ that's okay... is it? >
In fact, I think that's a Very Good Thing... it eliminates an unnecessary corner case. Same reason linked lists want head nodes and all that jazz.
-hpa