diff options
Diffstat (limited to 'unpack-trees.c')
-rw-r--r-- | unpack-trees.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index 3c7f464fa..68d34259c 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -328,8 +328,7 @@ static struct progress *get_progress(struct unpack_trees_options *o) total++; } - return start_progress_delay(_("Checking out files"), - total, 50, 1); + return start_delayed_progress(_("Checking out files"), total); } static int check_updates(struct unpack_trees_options *o) @@ -369,6 +368,7 @@ static int check_updates(struct unpack_trees_options *o) if (should_update_submodules() && o->update && !o->dry_run) load_gitmodules_file(index, &state); + enable_delayed_checkout(&state); for (i = 0; i < index->cache_nr; i++) { struct cache_entry *ce = index->cache[i]; @@ -383,6 +383,7 @@ static int check_updates(struct unpack_trees_options *o) } } } + errs |= finish_delayed_checkout(&state); stop_progress(&progress); if (o->update) git_attr_set_direction(GIT_ATTR_CHECKIN, NULL); @@ -649,10 +650,10 @@ static int traverse_trees_recursive(int n, unsigned long dirmask, else if (i > 1 && are_same_oid(&names[i], &names[i - 2])) t[i] = t[i - 2]; else { - const unsigned char *sha1 = NULL; + const struct object_id *oid = NULL; if (dirmask & 1) - sha1 = names[i].oid->hash; - buf[nr_buf++] = fill_tree_descriptor(t+i, sha1); + oid = names[i].oid; + buf[nr_buf++] = fill_tree_descriptor(t + i, oid); } } |