Re: [RFC PATCH 05/15] read_tree_recursive: Avoid missing blobs and trees in a sparse repository
- From
Elijah Newren <newren@gmail.com>
- Date
- Sep 5, 2010, 03:16 UTC
- Message-ID
- <AANLkTimsqDbtXArL_EQc+ZCqOd=tYWJ1ZXZpa7T5qUiH@mail.gmail.com>
- In-Reply-To
- <AANLkTinkz1YG45t3njtzj--LcPs3MPbGMTj9cWG_Nj6B@mail.gmail.com>
On Sat, Sep 4, 2010 at 8:00 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
Show 14 quoted lines
> On Sun, Sep 5, 2010 at 10:13 AM, Elijah Newren <newren@gmail.com> wrote: >> @@ -119,6 +119,11 @@ int read_tree_recursive(struct tree *tree, >> default: >> return -1; >> } >> + >> + if (git_sparse_pathspecs && >> + sha1_object_info(entry.sha1, NULL) <= 0) >> + continue; >> + > > I suppose this is temporary and the final solution would have stricter > checks (i.e. only ignore if those entries are outside sparse zone)? > This opens a door for broken repo.
Yes, good catch. Looks like I somehow missed that one, but I agree, there should be an "&& !tree_entry_interesting(...)" in there.