From: Eric Sunshine Date: Wed, 03 Sep 2014 12:02:58 GMT Subject: Re: [PATCH v2] cache-tree: do not try to use an invalidated subtree info to build a tree Message-ID: In-Reply-To: On Tue, Sep 2, 2014 at 6:39 PM, Junio C Hamano wrote: > We punt from repairing the cache-tree during a branch switching if > it involves having to create a new tree object that does not yet > exist in the object store. "mkdir dir && >dir/file && git add dir" > followed by "git checkout" is one example, when a tree that records > the state of such "dir/" is not in the object store. > > However, after discovering that we do not have a tree object that > records the state of "dir/", the caller failed to remember the fact > that it noticed the cache-tree entry it received for "dir/" is > invalidated, it already knows it should not be populating the level > callchain to stop the code to attempt populating the level that has > "dir/" as its immediate subdirectory, and it is not an error at all > for the sublevel cache-tree entry gave it a bogus object name it > shouldn't even look at. > > This led the caller detect and report a non-existent error. The end s/caller/caller to/ > result was the same and we avoided stuffing a non-existent tree to > the cache-tree, but we shouldn't have issued an alarming error > message to the user. > > Signed-off-by: Junio C Hamano