diff options
Diffstat (limited to 'cache-tree.c')
-rw-r--r-- | cache-tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cache-tree.c b/cache-tree.c index 75a54fdc72..32772b9564 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -1,4 +1,5 @@ #include "cache.h" +#include "lockfile.h" #include "tree.h" #include "tree-walk.h" #include "cache-tree.h" @@ -302,6 +303,8 @@ static int update_one(struct cache_tree *it, flags); if (subcnt < 0) return subcnt; + if (!subcnt) + die("index cache-tree records empty sub-tree"); i += subcnt; sub->count = subcnt; /* to be used in the next loop */ *skip_count += subskip; |