Re: commit-id fails after cg-init
- From
David A. Wheeler <dwheeler@dwheeler.com>
- Date
- May 4, 2005, 15:14 UTC
- Message-ID
- <4278E6D4.6060807@dwheeler.com>
- In-Reply-To
- <20050503211301.GA15995@pasky.ji.cz>
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?
That also means that empty directories will end up with the "empty tree" as well. Is there a risk of multiple empty directories causing problems later? As far as I can tell, there aren't any problems with that, and does seem logically sound.
--- David A. Wheeler