X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=preload-index.c;h=49cb08df96faa90101bb25d8f96acaffc066f19b;hb=b8939b2b3abaa99c18bf57251cd2828b89ac38c5;hp=e3d0bda31a98372eb9b6a8c2cd0fd65917a9dbde;hpb=c444c16589f95ac22d8e3ffe603cd7f0613512ce;p=git.git diff --git a/preload-index.c b/preload-index.c index e3d0bda31..49cb08df9 100644 --- a/preload-index.c +++ b/preload-index.c @@ -35,7 +35,9 @@ static void *preload_thread(void *_data) struct index_state *index = p->index; struct cache_entry **cep = index->cache + p->offset; struct cache_def cache; + struct pathspec pathspec; + init_pathspec(&pathspec, p->pathspec); memset(&cache, 0, sizeof(cache)); nr = p->nr; if (nr + p->offset > index->cache_nr) @@ -51,7 +53,7 @@ static void *preload_thread(void *_data) continue; if (ce_uptodate(ce)) continue; - if (!ce_path_match(ce, p->pathspec)) + if (!ce_path_match(ce, &pathspec)) continue; if (threaded_has_symlink_leading_path(&cache, ce->name, ce_namelen(ce))) continue; @@ -61,6 +63,7 @@ static void *preload_thread(void *_data) continue; ce_mark_uptodate(ce); } while (--nr > 0); + free_pathspec(&pathspec); return NULL; }