commit-graph: lazy-load trees for commits
[gitweb.git] / commit.h
index dc4bf97d9f3b74da1176d552f067e00b72a2d7fb..23a3f364edec6b609a39f15518cfda06af69e487 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -22,6 +22,12 @@ struct commit {
        unsigned int index;
        timestamp_t date;
        struct commit_list *parents;
+
+       /*
+        * If the commit is loaded from the commit-graph file, then this
+        * member may be NULL. Only access it through get_commit_tree()
+        * or get_commit_tree_oid().
+        */
        struct tree *maybe_tree;
        uint32_t graph_pos;
 };