X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=preload-index.c;h=92899333c2d8edbed71fdd3a43e19f25a10e5b03;hb=812d2a3d61b1bbb1931aff2ed6d2a17e939f5bf2;hp=14d52811832d8f2a3f6c1e1e5502c51ce73da82e;hpb=f62ce3de9dd4803f50f65e17f5fc03c7bdb49c40;p=git.git diff --git a/preload-index.c b/preload-index.c index 14d528118..92899333c 100644 --- a/preload-index.c +++ b/preload-index.c @@ -76,7 +76,7 @@ static void preload_index(struct index_state *index, const char **pathspec) if (threads > MAX_PARALLEL) threads = MAX_PARALLEL; offset = 0; - work = (index->cache_nr + threads - 1) / threads; + work = DIV_ROUND_UP(index->cache_nr, threads); for (i = 0; i < threads; i++) { struct thread_data *p = data+i; p->index = index;