X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=cache.h;h=38ad00661d5e0f5cc9f0d959c4c65c8c1ed238d9;hb=f48fd68887a03756658a46486a5dd1301c5a655f;hp=384b260227dfb2fa30ecc175681b9b8d73a3577a;hpb=045f5759c97746589a067461e50fad16f60711ac;p=git.git diff --git a/cache.h b/cache.h index 384b26022..38ad00661 100644 --- a/cache.h +++ b/cache.h @@ -128,7 +128,6 @@ static inline unsigned int ce_mode_from_stat(struct cache_entry *ce, unsigned in extern struct cache_entry **active_cache; extern unsigned int active_nr, active_alloc, active_cache_changed; extern struct cache_tree *active_cache_tree; -extern int cache_errno; enum object_type { OBJ_BAD = -1, @@ -152,6 +151,9 @@ enum object_type { #define CONFIG_ENVIRONMENT "GIT_CONFIG" #define CONFIG_LOCAL_ENVIRONMENT "GIT_CONFIG_LOCAL" #define EXEC_PATH_ENVIRONMENT "GIT_EXEC_PATH" +#define GITATTRIBUTES_FILE ".gitattributes" +#define INFOATTRIBUTES_FILE "info/attributes" +#define ATTRIBUTE_MACRO_PREFIX "[attr]" extern int is_bare_repository_cfg; extern int is_bare_repository(void); @@ -188,7 +190,7 @@ extern int add_cache_entry(struct cache_entry *ce, int option); extern struct cache_entry *refresh_cache_entry(struct cache_entry *ce, int really); extern int remove_cache_entry_at(int pos); extern int remove_file_from_cache(const char *path); -extern int add_file_to_index(const char *path, int verbose); +extern int add_file_to_cache(const char *path, int verbose); extern int ce_same_name(struct cache_entry *a, struct cache_entry *b); extern int ce_match_stat(struct cache_entry *ce, struct stat *st, int); extern int ce_modified(struct cache_entry *ce, struct stat *st, int); @@ -212,6 +214,11 @@ struct lock_file { }; extern int hold_lock_file_for_update(struct lock_file *, const char *path, int); extern int commit_lock_file(struct lock_file *); + +extern int hold_locked_index(struct lock_file *, int); +extern int commit_locked_index(struct lock_file *); +extern void set_alternate_index_output(const char *); + extern void rollback_lock_file(struct lock_file *); extern int delete_ref(const char *, unsigned char *sha1); @@ -428,7 +435,7 @@ extern unsigned char* use_pack(struct packed_git *, struct pack_window **, off_t extern void unuse_pack(struct pack_window **); extern struct packed_git *add_packed_git(const char *, int, int); extern uint32_t num_packed_objects(const struct packed_git *p); -extern int nth_packed_object_sha1(const struct packed_git *, uint32_t, unsigned char*); +extern const unsigned char *nth_packed_object_sha1(const struct packed_git *, uint32_t); extern off_t find_pack_entry_one(const unsigned char *, struct packed_git *); extern void *unpack_entry(struct packed_git *, off_t, enum object_type *, unsigned long *); extern unsigned long unpack_object_header_gently(const unsigned char *buf, unsigned long len, enum object_type *type, unsigned long *sizep); @@ -468,8 +475,8 @@ extern int pager_in_use; extern int pager_use_color; /* base85 */ -int decode_85(char *dst, char *line, int linelen); -void encode_85(char *buf, unsigned char *data, int bytes); +int decode_85(char *dst, const char *line, int linelen); +void encode_85(char *buf, const unsigned char *data, int bytes); /* alloc.c */ struct blob; @@ -492,4 +499,7 @@ extern void trace_argv_printf(const char **argv, int count, const char *format, extern int convert_to_git(const char *path, char **bufp, unsigned long *sizep); extern int convert_to_working_tree(const char *path, char **bufp, unsigned long *sizep); +/* match-trees.c */ +void shift_tree(const unsigned char *, const unsigned char *, unsigned char *, int); + #endif /* CACHE_H */