update_unicode.sh: move it into contrib/update-unicode
[gitweb.git] / cache-tree.c
index 215202c42d2243ebf704ac083937d65aa8497929..32772b95644d2f32841984b25b685379c6914ad4 100644 (file)
@@ -303,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;