@@ -30,6 +30,7 @@
#include "apply.h"
#include "entry.h"
#include "setup.h"
+#include "symlinks.h"
#include "wrapper.h"
struct gitdiff_data {
@@ -28,6 +28,7 @@
#include "setup.h"
#include "submodule.h"
#include "submodule-config.h"
+#include "symlinks.h"
#include "trace2.h"
#include "tree.h"
#include "tree-walk.h"
@@ -23,6 +23,7 @@
#include "dir.h"
#include "setup.h"
#include "split-index.h"
+#include "symlinks.h"
#include "fsmonitor.h"
#include "write-or-die.h"
@@ -593,28 +593,6 @@ int df_name_compare(const char *name1, size_t len1, int mode1,
int name_compare(const char *name1, size_t len1, const char *name2, size_t len2);
int cache_name_stage_compare(const char *name1, int len1, int stage1, const char *name2, int len2, int stage2);
-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);
-
struct pack_window {
struct pack_window *next;
unsigned char *base;
@@ -13,6 +13,7 @@
#include "../config.h"
#include "../environment.h"
#include "../trace2.h"
+#include "../symlinks.h"
#include "../wrapper.h"
#include "dir.h"
#include "gettext.h"
@@ -14,6 +14,7 @@
#include "unpack-trees.h"
#include "refs.h"
#include "submodule.h"
+#include "symlinks.h"
#include "trace.h"
#include "dir.h"
#include "fsmonitor.h"
@@ -25,6 +25,7 @@
#include "fsmonitor.h"
#include "setup.h"
#include "submodule-config.h"
+#include "symlinks.h"
#include "trace2.h"
#include "wrapper.h"
@@ -7,6 +7,7 @@
#include "hex.h"
#include "streaming.h"
#include "submodule.h"
+#include "symlinks.h"
#include "progress.h"
#include "fsmonitor.h"
#include "entry.h"
@@ -30,6 +30,7 @@
#include "string-list.h"
#include "submodule-config.h"
#include "submodule.h"
+#include "symlinks.h"
#include "tag.h"
#include "tree-walk.h"
#include "unpack-trees.h"
@@ -10,6 +10,7 @@
#include "run-command.h"
#include "sigchain.h"
#include "streaming.h"
+#include "symlinks.h"
#include "thread-utils.h"
#include "trace2.h"
#include "wrapper.h"
@@ -8,6 +8,7 @@
#include "attr.h"
#include "setup.h"
#include "strvec.h"
+#include "symlinks.h"
#include "quote.h"
/*
@@ -11,6 +11,7 @@
#include "progress.h"
#include "thread-utils.h"
#include "repository.h"
+#include "symlinks.h"
#include "trace2.h"
/*
@@ -30,6 +30,7 @@
#include "trace2.h"
#include "varint.h"
#include "split-index.h"
+#include "symlinks.h"
#include "utf8.h"
#include "fsmonitor.h"
#include "thread-utils.h"
@@ -5,6 +5,7 @@
#include "gettext.h"
#include "sigchain.h"
#include "strvec.h"
+#include "symlinks.h"
#include "thread-utils.h"
#include "strbuf.h"
#include "string-list.h"
@@ -1,6 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "gettext.h"
#include "setup.h"
+#include "symlinks.h"
static int threaded_check_leading_path(struct cache_def *cache, const char *name,
int len, int warn_on_lstat_err);
new file mode 100644
@@ -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 */
@@ -18,6 +18,7 @@
#include "sparse-index.h"
#include "submodule.h"
#include "submodule-config.h"
+#include "symlinks.h"
#include "trace2.h"
#include "fsmonitor.h"
#include "object-store.h"