* Return non-zero if all path components of 'name' exists as a * directory. If prefix_len > 0, we will test with the stat() * function instead of the lstat() function for a prefix length of * 'prefix_len', thus we then allow for symlinks in the prefix part as * long as those points to real existing directories. */
| 266 | * long as those points to real existing directories. |
| 267 | */ |
| 268 | static int threaded_has_dirs_only_path(struct cache_def *cache, const char *name, int len, int prefix_len) |
| 269 | { |
| 270 | /* |
| 271 | * Note: this function is used by the checkout machinery, which also |
| 272 | * takes care to properly reset the cache when it performs an operation |
| 273 | * that would leave the cache outdated. If this function starts caching |
| 274 | * anything else besides FL_DIR, remember to also invalidate the cache |
| 275 | * when creating or deleting paths that might be in the cache. |
| 276 | */ |
| 277 | return lstat_cache(cache, name, len, |
| 278 | FL_DIR|FL_FULLPATH, prefix_len) & |
| 279 | FL_DIR; |
| 280 | } |
| 281 | |
| 282 | static struct strbuf removal = STRBUF_INIT; |
| 283 |
no test coverage detected