Signed-off-by: Nguyán ThÃi Ngác Duy <pclouds@xxxxxxxxx> --- unpack-trees.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index f005454..eb5d357 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -996,6 +996,16 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options o->el = ⪙ } + if (!o->skip_sparse_checkout && + o->el->nr == 1 && + !strcmp(o->el->excludes[0]->pattern, "*")) { + for (i = 0; i < o->src_index->cache_nr; i++) + if (ce_skip_worktree(o->src_index->cache[i])) + break; + if (i == o->src_index->cache_nr) + o->skip_sparse_checkout = 1; + } + if (!o->skip_sparse_checkout) set_new_skip_worktree_1(o); -- 1.7.3.2.210.g045198 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html