diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 13:34:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 13:34:27 +0000 |
commit | 4dbdc42d9e7c3968ff7f690d00680419c9b8cb0f (patch) | |
tree | 47c1d492e9c956c1cd2b74dbd3b9d8b0db44dc4e /symlinks.h | |
parent | Initial commit. (diff) | |
download | git-4dbdc42d9e7c3968ff7f690d00680419c9b8cb0f.tar.xz git-4dbdc42d9e7c3968ff7f690d00680419c9b8cb0f.zip |
Adding upstream version 1:2.43.0.upstream/1%2.43.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'symlinks.h')
-rw-r--r-- | symlinks.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/symlinks.h b/symlinks.h new file mode 100644 index 0000000..7ae3d5b --- /dev/null +++ b/symlinks.h @@ -0,0 +1,28 @@ +#ifndef SYMLINKS_H +#define SYMLINKS_H + +#include "strbuf.h" + +struct cache_def { + struct strbuf path; + int flags; + int track_flags; + int prefix_len_stat_func; +}; +#define CACHE_DEF_INIT { \ + .path = STRBUF_INIT, \ +} +static inline void cache_def_clear(struct cache_def *cache) +{ + strbuf_release(&cache->path); +} + +int has_symlink_leading_path(const char *name, int len); +int threaded_has_symlink_leading_path(struct cache_def *, const char *, int); +int check_leading_path(const char *name, int len, int warn_on_lstat_err); +int has_dirs_only_path(const char *name, int len, int prefix_len); +void invalidate_lstat_cache(void); +void schedule_dir_for_removal(const char *name, int len); +void remove_scheduled_dirs(void); + +#endif /* SYMLINKS_H */ |