X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=cache.h;h=f630cf4bfa92e45600a83d2c3bac05a855deb847;hb=cb115748ec0d4c6faccd09f3637ea436482dd7d5;hp=07212b62d1fe7f9a821c41fedfe2003eb24df0d9;hpb=a5c8a98ca7e978c334e956df7ae2165c75c494da;p=git.git diff --git a/cache.h b/cache.h index 07212b62..f630cf4b 100644 --- a/cache.h +++ b/cache.h @@ -114,6 +114,7 @@ static inline unsigned int create_ce_mode(unsigned int mode) extern struct cache_entry **active_cache; extern unsigned int active_nr, active_alloc, active_cache_changed; +extern struct cache_tree *active_cache_tree; #define GIT_DIR_ENVIRONMENT "GIT_DIR" #define DEFAULT_GIT_DIR_ENVIRONMENT ".git" @@ -166,13 +167,13 @@ extern void fill_stat_cache_info(struct cache_entry *ce, struct stat *st); #define REFRESH_IGNORE_MISSING 0x0008 /* ignore non-existent */ extern int refresh_cache(unsigned int flags); -struct cache_file { - struct cache_file *next; - char lockfile[PATH_MAX]; +struct lock_file { + struct lock_file *next; + char filename[PATH_MAX]; }; -extern int hold_index_file_for_update(struct cache_file *, const char *path); -extern int commit_index_file(struct cache_file *); -extern void rollback_index_file(struct cache_file *); +extern int hold_lock_file_for_update(struct lock_file *, const char *path); +extern int commit_lock_file(struct lock_file *); +extern void rollback_lock_file(struct lock_file *); /* Environment bits from configuration mechanism */ extern int trust_executable_bit; @@ -209,7 +210,7 @@ int git_mkstemp(char *path, size_t n, const char *template); int adjust_shared_perm(const char *path); int safe_create_leading_directories(char *path); -char *safe_strncpy(char *, const char *, size_t); +size_t safe_strncpy(char *, const char *, size_t); char *enter_repo(char *path, int strict); /* Read and unpack a sha1 file into memory, write memory to a sha1 file */