summaryrefslogtreecommitdiff
path: root/parallel-checkout.c
diff options
context:
space:
mode:
Diffstat (limited to 'parallel-checkout.c')
-rw-r--r--parallel-checkout.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/parallel-checkout.c b/parallel-checkout.c
index 31a3d0e..4f6819f 100644
--- a/parallel-checkout.c
+++ b/parallel-checkout.c
@@ -143,7 +143,8 @@ static int is_eligible_for_parallel_checkout(const struct cache_entry *ce,
}
}
-int enqueue_checkout(struct cache_entry *ce, struct conv_attrs *ca)
+int enqueue_checkout(struct cache_entry *ce, struct conv_attrs *ca,
+ int *checkout_counter)
{
struct parallel_checkout_item *pc_item;
@@ -159,6 +160,7 @@ int enqueue_checkout(struct cache_entry *ce, struct conv_attrs *ca)
memcpy(&pc_item->ca, ca, sizeof(pc_item->ca));
pc_item->status = PC_ITEM_PENDING;
pc_item->id = parallel_checkout.nr;
+ pc_item->checkout_counter = checkout_counter;
parallel_checkout.nr++;
return 0;
@@ -200,7 +202,8 @@ static int handle_results(struct checkout *state)
switch(pc_item->status) {
case PC_ITEM_WRITTEN:
- /* Already handled */
+ if (pc_item->checkout_counter)
+ (*pc_item->checkout_counter)++;
break;
case PC_ITEM_COLLIDED:
/*
@@ -225,7 +228,8 @@ static int handle_results(struct checkout *state)
* add any extra overhead.
*/
ret |= checkout_entry_ca(pc_item->ce, &pc_item->ca,
- state, NULL, NULL);
+ state, NULL,
+ pc_item->checkout_counter);
advance_progress_meter();
break;
case PC_ITEM_PENDING: