provide a facility for "delayed" progress reporting
[gitweb.git] / cache-tree.c
index a80326289dbea2c08acce577cf8eef26a0cfba68..6369cc7c536ba7b82a6afcb191628beefe889b72 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;
        }
@@ -324,7 +326,7 @@ static int update_one(struct cache_tree *it,
                        mode = ntohl(ce->ce_mode);
                        entlen = pathlen - baselen;
                }
-               if (!missing_ok && !has_sha1_file(sha1))
+               if (mode != S_IFDIRLNK && !missing_ok && !has_sha1_file(sha1))
                        return error("invalid object %s", sha1_to_hex(sha1));
 
                if (!ce->ce_mode)