Re: [PATCH v3 4/4] cache-tree: do not generate empty trees as a result of all i-t-a subentries

2016-07-13 Thread Duy Nguyen
On Tue, Jul 12, 2016 at 10:49 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> diff --git a/cache-tree.c b/cache-tree.c >> index c2676e8..2d50640 100644 >> --- a/cache-tree.c >> +++ b/cache-tree.c >> @@ -380,6 +380,13 @@ static int update_one(struct cache_tree *it, >>

Re: [PATCH v3 4/4] cache-tree: do not generate empty trees as a result of all i-t-a subentries

2016-07-12 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/cache-tree.c b/cache-tree.c > index c2676e8..2d50640 100644 > --- a/cache-tree.c > +++ b/cache-tree.c > @@ -380,6 +380,13 @@ static int update_one(struct cache_tree *it, > continue; > } > > + /* > +

[PATCH v3 4/4] cache-tree: do not generate empty trees as a result of all i-t-a subentries

2016-07-08 Thread Nguyễn Thái Ngọc Duy
If a subdirectory contains nothing but i-t-a entries, we generate an empty tree object and add it to its parent tree. Which is wrong. Such a subdirectory should not be added. Note that this has a cascading effect. If subdir 'a/b/c' contains nothing but i-t-a entries, we ignore it. But then if 'a/b