summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJared Hance <jaredhance@gmail.com>2012-03-02 21:31:15 -0500
committerJunio C Hamano <gitster@pobox.com>2012-03-02 23:56:28 -0800
commit15438d5a56acfd08545a11630821179334eb6979 (patch)
tree8b9ae9765fb8415e6fc1182d6704647c52e4b038 /cache.h
parent70eb130768d17c33b9efbf60d7953cf6a57daecb (diff)
downloadgit-15438d5a56acfd08545a11630821179334eb6979.tar.gz
Add threaded versions of functions in symlinks.c.jh/threadable-symlink-check
check_leading_path() and has_dirs_only_path() both always use the default cache, which could be a caveat for adding parallelism (which is a concern and even a GSoC proposal). Reimplement these two in terms of new threaded_check_leading_path() and threaded_has_dirs_only_path() that take their own copy of the cache. Signed-off-by: Jared Hance <jaredhance@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 3a8e1258e7..26ca955dc9 100644
--- a/cache.h
+++ b/cache.h
@@ -950,7 +950,9 @@ struct cache_def {
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 check_leading_path(const char *name, int len);
+extern int threaded_check_leading_path(struct cache_def *cache, const char *name, int len);
extern int has_dirs_only_path(const char *name, int len, int prefix_len);
+extern int threaded_has_dirs_only_path(struct cache_def *cache, const char *name, int len, int prefix_len);
extern void schedule_dir_for_removal(const char *name, int len);
extern void remove_scheduled_dirs(void);