summaryrefslogtreecommitdiff
path: root/cache-tree.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-05-20 11:04:35 -0700
committerJunio C Hamano <gitster@pobox.com>2009-05-20 11:07:07 -0700
commitd11b8d342529a8fe2164ceb563ad9213902d3533 (patch)
tree890ca0413eb098ef8cc8222fa0de72ccd66bee4c /cache-tree.h
parentd00e364de99d51bb76e437820e23cfa820417ec5 (diff)
downloadgit-d11b8d342529a8fe2164ceb563ad9213902d3533.tar.gz
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 <gitster@pobox.com>
Diffstat (limited to 'cache-tree.h')
-rw-r--r--cache-tree.h7
1 files changed, 6 insertions, 1 deletions
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