path: root/cache.h
diff options
authorLinus Torvalds <>2009-07-09 20:35:31 (GMT)
committerJunio C Hamano <>2009-07-10 03:05:19 (GMT)
commitb9fd284657de3ec30922fb17c0baf243ae947fdd (patch)
treedb952a083002444b5c95af6f40a39f8b32d258e0 /cache.h
parent867f72bf434a05b9eadf851a81564be5173fbba5 (diff)
Export thread-safe version of 'has_symlink_leading_path()'
The threaded index preloading will want it, so that it can avoid locking by simply using a per-thread symlink/directory cache. Signed-off-by: Linus Torvalds <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'cache.h')
1 files changed, 10 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 871c984..f1e5ede 100644
--- a/cache.h
+++ b/cache.h
@@ -744,7 +744,17 @@ struct checkout {
extern int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath);
+struct cache_def {
+ char path[PATH_MAX + 1];
+ int len;
+ int flags;
+ int track_flags;
+ int prefix_len_stat_func;
extern int has_symlink_leading_path(const char *name, int len);
+extern int threaded_has_symlink_leading_path(struct cache_def *, const char *, int);
extern int has_symlink_or_noent_leading_path(const char *name, int len);
extern int has_dirs_only_path(const char *name, int len, int prefix_len);
extern void invalidate_lstat_cache(const char *name, int len);