X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=preload-index.c;h=88edc5f8a9d5384e19426e6adb40e08b34d3adf2;hb=35fb0e8633217f602360a9987af51c4b960e7850;hp=6253578c9683c981144433c8da210e763e38f274;hpb=671c9b7e315db89081cc69f83a8f405e4aca37bc;p=git.git diff --git a/preload-index.c b/preload-index.c index 6253578c9..88edc5f8a 100644 --- a/preload-index.c +++ b/preload-index.c @@ -2,6 +2,14 @@ * Copyright (C) 2008 Linus Torvalds */ #include "cache.h" + +#ifdef NO_PTHREADS +static void preload_index(struct index_state *index, const char **pathspec) +{ + ; /* nothing */ +} +#else + #include /* @@ -43,7 +51,7 @@ static void *preload_thread(void *_data) continue; if (lstat(ce->name, &st)) continue; - if (ie_match_stat(index, ce, &st, 0)) + if (ie_match_stat(index, ce, &st, CE_MATCH_RACY_IS_DIRTY)) continue; ce_mark_uptodate(ce); } while (--nr > 0); @@ -81,6 +89,7 @@ static void preload_index(struct index_state *index, const char **pathspec) die("unable to join threaded lstat"); } } +#endif int read_index_preload(struct index_state *index, const char **pathspec) {