Re: [PATCH v2] cache-tree: invalidate i-t-a paths after generating trees

2012-12-10 Thread Junio C Hamano
Nguyen Thai Ngoc Duy writes: > Yeah I use entry_count for two different things here. In the previous > (unsent) version of the patch I had "entry_count = -1" right after "i > -= entry_count" > >>> + if (sub->cache_tree->entry_count < 0) { >>> + i -=

Re: [PATCH v2] cache-tree: invalidate i-t-a paths after generating trees

2012-12-10 Thread Nguyen Thai Ngoc Duy
On Mon, Dec 10, 2012 at 1:50 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> diff --git a/cache-tree.c b/cache-tree.c >> index 28ed657..989a7ff 100644 >> --- a/cache-tree.c >> +++ b/cache-tree.c >> @@ -248,6 +248,7 @@ static int update_one(struct cache_tree *it, >> int missin

Re: [PATCH v2] cache-tree: invalidate i-t-a paths after generating trees

2012-12-09 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/cache-tree.c b/cache-tree.c > index 28ed657..989a7ff 100644 > --- a/cache-tree.c > +++ b/cache-tree.c > @@ -248,6 +248,7 @@ static int update_one(struct cache_tree *it, > int missing_ok = flags & WRITE_TREE_MISSING_OK; > int dryrun = flags

[PATCH v2] cache-tree: invalidate i-t-a paths after generating trees

2012-12-07 Thread Nguyễn Thái Ngọc Duy
Intent-to-add entries used to forbid writing trees so it was not a problem. After commit 3f6d56d (commit: ignore intent-to-add entries instead of refusing - 2012-02-07), we can generate trees from an index with i-t-a entries. However, the commit forgets to invalidate all paths leading to i-t-a ent