X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=cache.h;h=89f6a40d1a1011bca4d546c5979d66d44b408ece;hb=2ec33cdd19bd80308fcef45828e37e79c4b56dc5;hp=4d89aa3da4d32653289c742f37abe8ef604ab11b;hpb=000d2c07ef65b19bd9cf30ef44a3018b8f110b2c;p=git.git diff --git a/cache.h b/cache.h index 4d89aa3da..89f6a40d1 100644 --- a/cache.h +++ b/cache.h @@ -388,6 +388,15 @@ static inline enum object_type object_type(unsigned int mode) #define GIT_NOTES_REF_ENVIRONMENT "GIT_NOTES_REF" #define GIT_NOTES_DEFAULT_REF "refs/notes/commits" +/* + * Repository-local GIT_* environment variables + * The array is NULL-terminated to simplify its usage in contexts such + * environment creation or simple walk of the list. + * The number of non-NULL entries is available as a macro. + */ +#define LOCAL_REPO_ENV_SIZE 8 +extern const char *const local_repo_env[LOCAL_REPO_ENV_SIZE + 1]; + extern int is_bare_repository_cfg; extern int is_bare_repository(void); extern int is_inside_git_dir(void); @@ -679,6 +688,7 @@ int normalize_path_copy(char *dst, const char *src); int longest_ancestor_length(const char *path, const char *prefix_list); char *strip_path_suffix(const char *path, const char *suffix); int daemon_avoid_alias(const char *path); +int offset_1st_component(const char *path); /* Read and unpack a sha1 file into memory, write memory to a sha1 file */ extern int sha1_object_info(const unsigned char *, unsigned long *);