diff options
author | Jared Hance <jaredhance@gmail.com> | 2012-03-02 21:31:15 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-03-02 23:56:28 -0800 |
commit | 15438d5a56acfd08545a11630821179334eb6979 (patch) | |
tree | 8b9ae9765fb8415e6fc1182d6704647c52e4b038 /cache.h | |
parent | 70eb130768d17c33b9efbf60d7953cf6a57daecb (diff) | |
download | git-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |