From d11b8d342529a8fe2164ceb563ad9213902d3533 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 20 May 2009 11:04:35 -0700 Subject: write-tree --ignore-cache-tree This allows you to discard the cache-tree information before writing the tree out of the index (i.e. it always recomputes the tree object names for all the subtrees). This is only useful as a debug option, so I did not bother documenting it. Signed-off-by: Junio C Hamano --- cache-tree.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cache-tree.h') diff --git a/cache-tree.h b/cache-tree.h index e958835236..eadcad8adc 100644 --- a/cache-tree.h +++ b/cache-tree.h @@ -30,11 +30,16 @@ struct cache_tree *cache_tree_read(const char *buffer, unsigned long size); int cache_tree_fully_valid(struct cache_tree *); int cache_tree_update(struct cache_tree *, struct cache_entry **, int, int, int); +/* bitmasks to write_cache_as_tree flags */ +#define WRITE_TREE_MISSING_OK 1 +#define WRITE_TREE_IGNORE_CACHE_TREE 2 + +/* error return codes */ #define WRITE_TREE_UNREADABLE_INDEX (-1) #define WRITE_TREE_UNMERGED_INDEX (-2) #define WRITE_TREE_PREFIX_ERROR (-3) -int write_cache_as_tree(unsigned char *sha1, int missing_ok, const char *prefix); +int write_cache_as_tree(unsigned char *sha1, int flags, const char *prefix); void prime_cache_tree(struct cache_tree **, struct tree *); #endif -- cgit v1.2.3