Teach tree_entry_interesting() that the tree entries are sorted.
[gitweb.git] / cache-tree.c
index a80326289dbea2c08acce577cf8eef26a0cfba68..9b73c8669a0946c3bcbf1de777e9acd4cd34bcae 100644 (file)
@@ -282,6 +282,8 @@ static int update_one(struct cache_tree *it,
                                    baselen + sublen + 1,
                                    missing_ok,
                                    dryrun);
+               if (subcnt < 0)
+                       return subcnt;
                i += subcnt - 1;
                sub->used = 1;
        }