aboutsummaryrefslogtreecommitdiff
path: root/cache-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'cache-tree.c')
-rw-r--r--cache-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cache-tree.c b/cache-tree.c
index a80326289..9b73c8669 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -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;
}