treewide: replace maybe_tree with accessor methods
[gitweb.git] / commit.h
index 0fb8271665c6c98ccca803fbe002327bf38fcfb3..dc4bf97d9f3b74da1176d552f067e00b72a2d7fb 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -9,6 +9,8 @@
 #include "string-list.h"
 #include "pretty.h"
 
+#define COMMIT_NOT_FROM_GRAPH 0xFFFFFFFF
+
 struct commit_list {
        struct commit *item;
        struct commit_list *next;
@@ -20,7 +22,8 @@ struct commit {
        unsigned int index;
        timestamp_t date;
        struct commit_list *parents;
-       struct tree *tree;
+       struct tree *maybe_tree;
+       uint32_t graph_pos;
 };
 
 extern int save_commit_buffer;
@@ -99,6 +102,9 @@ void unuse_commit_buffer(const struct commit *, const void *buffer);
  */
 void free_commit_buffer(struct commit *);
 
+struct tree *get_commit_tree(const struct commit *);
+struct object_id *get_commit_tree_oid(const struct commit *);
+
 /*
  * Disassociate any cached object buffer from the commit, but do not free it.
  * The buffer (or NULL, if none) is returned.