5 struct cache_tree_sub
{
6 struct cache_tree
*cache_tree
;
13 int entry_count
; /* negative means "invalid" */
14 unsigned char sha1
[20];
17 struct cache_tree_sub
**down
;
20 struct cache_tree
*cache_tree(void);
21 void cache_tree_free(struct cache_tree
**);
22 void cache_tree_invalidate_path(struct cache_tree
*, const char *);
23 struct cache_tree_sub
*cache_tree_sub(struct cache_tree
*, const char *);
25 void cache_tree_write(struct strbuf
*, struct cache_tree
*root
);
26 struct cache_tree
*cache_tree_read(const char *buffer
, unsigned long size
);
28 int cache_tree_fully_valid(struct cache_tree
*);
29 int cache_tree_update(struct cache_tree
*, struct cache_entry
**, int, int, int);
31 #define WRITE_TREE_UNREADABLE_INDEX (-1)
32 #define WRITE_TREE_UNMERGED_INDEX (-2)
33 #define WRITE_TREE_PREFIX_ERROR (-3)
35 int write_cache_as_tree(unsigned char *sha1
, int missing_ok
, const char *prefix
);