1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-04-24 08:35:16 +02:00

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>
This commit is contained in:
Elijah Newren 2023-04-22 20:17:09 +00:00 committed by Junio C Hamano
parent 69a63fe663
commit cb2a51356d
17 changed files with 44 additions and 23 deletions

View File

@ -30,6 +30,7 @@
#include "apply.h"
#include "entry.h"
#include "setup.h"
#include "symlinks.h"
#include "wrapper.h"
struct gitdiff_data {

View File

@ -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"

View File

@ -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"

22
cache.h
View File

@ -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;

View File

@ -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"

View File

@ -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"

1
dir.c
View File

@ -25,6 +25,7 @@
#include "fsmonitor.h"
#include "setup.h"
#include "submodule-config.h"
#include "symlinks.h"
#include "trace2.h"
#include "wrapper.h"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -8,6 +8,7 @@
#include "attr.h"
#include "setup.h"
#include "strvec.h"
#include "symlinks.h"
#include "quote.h"
/*

View File

@ -11,6 +11,7 @@
#include "progress.h"
#include "thread-utils.h"
#include "repository.h"
#include "symlinks.h"
#include "trace2.h"
/*

View File

@ -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"

View File

@ -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"

View File

@ -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);

28
symlinks.h Normal file
View File

@ -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 */

View File

@ -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"