aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-11 22:13:44 -0700
committerJunio C Hamano <gitster@pobox.com>2008-03-11 22:13:44 -0700
commitb85997d14d1873a4baa3d04966cd5947e6134acd (patch)
treeb21c76c4bc0d3fbb4221283334065216e17beff1 /cache.h
parentb81a7b58875e07d7e82aafced1de9834ba1ef94a (diff)
parent20a16eb33eee99fd3eab00c72f012b98d4eeee76 (diff)
downloadgit-b85997d14d1873a4baa3d04966cd5947e6134acd.tar.gz
git-b85997d14d1873a4baa3d04966cd5947e6134acd.tar.xz
Merge branch 'lt/unpack-trees'
* lt/unpack-trees: unpack_trees(): fix diff-index regression. traverse_trees_recursive(): propagate merge errors up unpack_trees(): minor memory leak fix in unused destination index Make 'unpack_trees()' have a separate source and destination index Make 'unpack_trees()' take the index to work on as an argument Add 'const' where appropriate to index handling functions Fix tree-walking compare_entry() in the presense of --prefix Move 'unpack_trees()' over to 'traverse_trees()' interface Make 'traverse_trees()' traverse conflicting DF entries in parallel Add return value to 'traverse_tree()' callback Make 'traverse_tree()' use linked structure rather than 'const char *base' Add 'df_name_compare()' helper function
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/cache.h b/cache.h
index bdefcc918..2a1e7ec6b 100644
--- a/cache.h
+++ b/cache.h
@@ -346,12 +346,12 @@ extern void verify_non_filename(const char *prefix, const char *name);
/* Initialize and use the cache information */
extern int read_index(struct index_state *);
extern int read_index_from(struct index_state *, const char *path);
-extern int write_index(struct index_state *, int newfd);
+extern int write_index(const struct index_state *, int newfd);
extern int discard_index(struct index_state *);
-extern int unmerged_index(struct index_state *);
+extern int unmerged_index(const struct index_state *);
extern int verify_path(const char *path);
extern int index_name_exists(struct index_state *istate, const char *name, int namelen);
-extern int index_name_pos(struct index_state *, const char *name, int namelen);
+extern int index_name_pos(const struct index_state *, const char *name, int namelen);
#define ADD_CACHE_OK_TO_ADD 1 /* Ok to add */
#define ADD_CACHE_OK_TO_REPLACE 2 /* Ok to replace file/directory */
#define ADD_CACHE_SKIP_DFCHECK 4 /* Ok to skip DF conflict checks */
@@ -368,8 +368,8 @@ extern int ce_same_name(struct cache_entry *a, struct cache_entry *b);
#define CE_MATCH_IGNORE_VALID 01
/* do not check the contents but report dirty on racily-clean entries */
#define CE_MATCH_RACY_IS_DIRTY 02
-extern int ie_match_stat(struct index_state *, struct cache_entry *, struct stat *, unsigned int);
-extern int ie_modified(struct index_state *, struct cache_entry *, struct stat *, unsigned int);
+extern int ie_match_stat(const struct index_state *, struct cache_entry *, struct stat *, unsigned int);
+extern int ie_modified(const struct index_state *, struct cache_entry *, struct stat *, unsigned int);
extern int ce_path_match(const struct cache_entry *ce, const char **pathspec);
extern int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object, enum object_type type, const char *path);
@@ -536,6 +536,7 @@ extern int create_symref(const char *ref, const char *refs_heads_master, const c
extern int validate_headref(const char *ref);
extern int base_name_compare(const char *name1, int len1, int mode1, const char *name2, int len2, int mode2);
+extern int df_name_compare(const char *name1, int len1, int mode1, const char *name2, int len2, int mode2);
extern int cache_name_compare(const char *name1, int len1, const char *name2, int len2);
extern void *read_object_with_reference(const unsigned char *sha1,