Re: [PATCH] cache-tree: do not cache empty trees
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Feb 8, 2011, 04:11 UTC
- Message-ID
- <AANLkTim_G9cPs=+1GQ2qBEgriOyKYgXk17iHE4oq9h2C@mail.gmail.com>
- In-Reply-To
- <7v1v3jvaef.fsf@alter.siamese.dyndns.org>
On Tue, Feb 8, 2011 at 3:48 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes: > >> Perhaps it's not a good approach after all. What I wanted was to make >> pre-1.8.0 tolerate empty trees created by 1.8.0. Perhaps it's better >> to just let pre-1.8.0 refuse to work with empty trees, forcing users >> to upgrade to 1.8.0? > > I don't think we saw even something remotely resembles an agreement that > empty tree is a good thing to have yet. Why are you rushing things?
But empty trees are allowed in repo since 79b1138 (fsck.c: fix bogus "empty tree" check). Index can't handle empty trees, so it's a bug to me that index still accepts them as input and silently discard them. A bug regardless directory tracking support in 1.8.0. A corner case that nobody would likely encounter (except Ilari and his "ghost directory" problem).
-- Duy