commit: add generation number to struct commit
[gitweb.git] / commit.h
index 23a3f364edec6b609a39f15518cfda06af69e487..aac3b8c56faf4b82199fb7d7763aad06f2e4e32f 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -10,6 +10,9 @@
 #include "pretty.h"
 
 #define COMMIT_NOT_FROM_GRAPH 0xFFFFFFFF
+#define GENERATION_NUMBER_INFINITY 0xFFFFFFFF
+#define GENERATION_NUMBER_MAX 0x3FFFFFFF
+#define GENERATION_NUMBER_ZERO 0
 
 struct commit_list {
        struct commit *item;
@@ -30,6 +33,7 @@ struct commit {
         */
        struct tree *maybe_tree;
        uint32_t graph_pos;
+       uint32_t generation;
 };
 
 extern int save_commit_buffer;