parallel-checkout: support progress displaying
Original-patch-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
7531e4b66e
commit
1c4d6f46be
@ -474,17 +474,22 @@ static int check_updates(struct unpack_trees_options *o,
|
||||
struct cache_entry *ce = index->cache[i];
|
||||
|
||||
if (ce->ce_flags & CE_UPDATE) {
|
||||
size_t last_pc_queue_size = pc_queue_size();
|
||||
|
||||
if (ce->ce_flags & CE_WT_REMOVE)
|
||||
BUG("both update and delete flags are set on %s",
|
||||
ce->name);
|
||||
display_progress(progress, ++cnt);
|
||||
ce->ce_flags &= ~CE_UPDATE;
|
||||
errs |= checkout_entry(ce, &state, NULL, NULL);
|
||||
|
||||
if (last_pc_queue_size == pc_queue_size())
|
||||
display_progress(progress, ++cnt);
|
||||
}
|
||||
}
|
||||
stop_progress(&progress);
|
||||
if (pc_workers > 1)
|
||||
errs |= run_parallel_checkout(&state, pc_workers, pc_threshold);
|
||||
errs |= run_parallel_checkout(&state, pc_workers, pc_threshold,
|
||||
progress, &cnt);
|
||||
stop_progress(&progress);
|
||||
errs |= finish_delayed_checkout(&state, NULL);
|
||||
git_attr_set_direction(GIT_ATTR_CHECKIN);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user