Git fork

symlinks.h: move declarations for symlinks.c functions from cache.h

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Elijah Newren and committed by
Junio C Hamano
cb2a5135 69a63fe6

+44 -23
+1
apply.c
··· 30 30 #include "apply.h" 31 31 #include "entry.h" 32 32 #include "setup.h" 33 + #include "symlinks.h" 33 34 #include "wrapper.h" 34 35 35 36 struct gitdiff_data {
+1
builtin/checkout.c
··· 28 28 #include "setup.h" 29 29 #include "submodule.h" 30 30 #include "submodule-config.h" 31 + #include "symlinks.h" 31 32 #include "trace2.h" 32 33 #include "tree.h" 33 34 #include "tree-walk.h"
+1
builtin/update-index.c
··· 23 23 #include "dir.h" 24 24 #include "setup.h" 25 25 #include "split-index.h" 26 + #include "symlinks.h" 26 27 #include "fsmonitor.h" 27 28 #include "write-or-die.h" 28 29
-22
cache.h
··· 593 593 int name_compare(const char *name1, size_t len1, const char *name2, size_t len2); 594 594 int cache_name_stage_compare(const char *name1, int len1, int stage1, const char *name2, int len2, int stage2); 595 595 596 - struct cache_def { 597 - struct strbuf path; 598 - int flags; 599 - int track_flags; 600 - int prefix_len_stat_func; 601 - }; 602 - #define CACHE_DEF_INIT { \ 603 - .path = STRBUF_INIT, \ 604 - } 605 - static inline void cache_def_clear(struct cache_def *cache) 606 - { 607 - strbuf_release(&cache->path); 608 - } 609 - 610 - int has_symlink_leading_path(const char *name, int len); 611 - int threaded_has_symlink_leading_path(struct cache_def *, const char *, int); 612 - int check_leading_path(const char *name, int len, int warn_on_lstat_err); 613 - int has_dirs_only_path(const char *name, int len, int prefix_len); 614 - void invalidate_lstat_cache(void); 615 - void schedule_dir_for_removal(const char *name, int len); 616 - void remove_scheduled_dirs(void); 617 - 618 596 struct pack_window { 619 597 struct pack_window *next; 620 598 unsigned char *base;
+1
compat/mingw.c
··· 13 13 #include "../config.h" 14 14 #include "../environment.h" 15 15 #include "../trace2.h" 16 + #include "../symlinks.h" 16 17 #include "../wrapper.h" 17 18 #include "dir.h" 18 19 #include "gettext.h"
+1
diff-lib.c
··· 14 14 #include "unpack-trees.h" 15 15 #include "refs.h" 16 16 #include "submodule.h" 17 + #include "symlinks.h" 17 18 #include "trace.h" 18 19 #include "dir.h" 19 20 #include "fsmonitor.h"
+1
dir.c
··· 25 25 #include "fsmonitor.h" 26 26 #include "setup.h" 27 27 #include "submodule-config.h" 28 + #include "symlinks.h" 28 29 #include "trace2.h" 29 30 #include "wrapper.h" 30 31
+1
entry.c
··· 7 7 #include "hex.h" 8 8 #include "streaming.h" 9 9 #include "submodule.h" 10 + #include "symlinks.h" 10 11 #include "progress.h" 11 12 #include "fsmonitor.h" 12 13 #include "entry.h"
+1
merge-recursive.c
··· 30 30 #include "string-list.h" 31 31 #include "submodule-config.h" 32 32 #include "submodule.h" 33 + #include "symlinks.h" 33 34 #include "tag.h" 34 35 #include "tree-walk.h" 35 36 #include "unpack-trees.h"
+1
parallel-checkout.c
··· 10 10 #include "run-command.h" 11 11 #include "sigchain.h" 12 12 #include "streaming.h" 13 + #include "symlinks.h" 13 14 #include "thread-utils.h" 14 15 #include "trace2.h" 15 16 #include "wrapper.h"
+1
pathspec.c
··· 8 8 #include "attr.h" 9 9 #include "setup.h" 10 10 #include "strvec.h" 11 + #include "symlinks.h" 11 12 #include "quote.h" 12 13 13 14 /*
+1
preload-index.c
··· 11 11 #include "progress.h" 12 12 #include "thread-utils.h" 13 13 #include "repository.h" 14 + #include "symlinks.h" 14 15 #include "trace2.h" 15 16 16 17 /*
+1
read-cache.c
··· 30 30 #include "trace2.h" 31 31 #include "varint.h" 32 32 #include "split-index.h" 33 + #include "symlinks.h" 33 34 #include "utf8.h" 34 35 #include "fsmonitor.h" 35 36 #include "thread-utils.h"
+1
run-command.c
··· 5 5 #include "gettext.h" 6 6 #include "sigchain.h" 7 7 #include "strvec.h" 8 + #include "symlinks.h" 8 9 #include "thread-utils.h" 9 10 #include "strbuf.h" 10 11 #include "string-list.h"
+2 -1
symlinks.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "gettext.h" 3 3 #include "setup.h" 4 + #include "symlinks.h" 4 5 5 6 static int threaded_check_leading_path(struct cache_def *cache, const char *name, 6 7 int len, int warn_on_lstat_err);
+28
symlinks.h
··· 1 + #ifndef SYMLINKS_H 2 + #define SYMLINKS_H 3 + 4 + #include "strbuf.h" 5 + 6 + struct cache_def { 7 + struct strbuf path; 8 + int flags; 9 + int track_flags; 10 + int prefix_len_stat_func; 11 + }; 12 + #define CACHE_DEF_INIT { \ 13 + .path = STRBUF_INIT, \ 14 + } 15 + static inline void cache_def_clear(struct cache_def *cache) 16 + { 17 + strbuf_release(&cache->path); 18 + } 19 + 20 + int has_symlink_leading_path(const char *name, int len); 21 + int threaded_has_symlink_leading_path(struct cache_def *, const char *, int); 22 + int check_leading_path(const char *name, int len, int warn_on_lstat_err); 23 + int has_dirs_only_path(const char *name, int len, int prefix_len); 24 + void invalidate_lstat_cache(void); 25 + void schedule_dir_for_removal(const char *name, int len); 26 + void remove_scheduled_dirs(void); 27 + 28 + #endif /* SYMLINKS_H */
+1
unpack-trees.c
··· 18 18 #include "sparse-index.h" 19 19 #include "submodule.h" 20 20 #include "submodule-config.h" 21 + #include "symlinks.h" 21 22 #include "trace2.h" 22 23 #include "fsmonitor.h" 23 24 #include "object-store.h"