commit: add generation number to struct commit
[gitweb.git] / commit-graph.c
index 70fa1b25fd3d07a935cc0e7ba4cf70bc24ca3d21..9ad21c3ffb6fb0104deba7e8fed12972351ce51b 100644 (file)
@@ -262,6 +262,8 @@ static int fill_commit_in_graph(struct commit *item, struct commit_graph *g, uin
        date_low = get_be32(commit_data + g->hash_len + 12);
        item->date = (timestamp_t)((date_high << 32) | date_low);
 
+       item->generation = get_be32(commit_data + g->hash_len + 8) >> 2;
+
        pptr = &item->parents;
 
        edge_value = get_be32(commit_data + g->hash_len);