Merge branch 'ak/corrected-commit-date'

The commit-graph learned to use corrected commit dates instead of
the generation number to help topological revision traversal.

* ak/corrected-commit-date:
  doc: add corrected commit date info
  commit-reach: use corrected commit dates in paint_down_to_common()
  commit-graph: use generation v2 only if entire chain does
  commit-graph: implement generation data chunk
  commit-graph: implement corrected commit date
  commit-graph: return 64-bit generation number
  commit-graph: add a slab to store topological levels
  t6600-test-reach: generalize *_three_modes
  commit-graph: consolidate fill_commit_graph_info
  revision: parse parent in indegree_walk_step()
  commit-graph: fix regression when computing Bloom filters
This commit is contained in:
Junio C Hamano
2021-02-17 17:21:40 -08:00
19 changed files with 668 additions and 155 deletions

View File

@ -3270,7 +3270,7 @@ define_commit_slab(indegree_slab, int);
define_commit_slab(author_date_slab, timestamp_t);
struct topo_walk_info {
uint32_t min_generation;
timestamp_t min_generation;
struct prio_queue explore_queue;
struct prio_queue indegree_queue;
struct prio_queue topo_queue;
@ -3338,7 +3338,7 @@ static void explore_walk_step(struct rev_info *revs)
}
static void explore_to_depth(struct rev_info *revs,
uint32_t gen_cutoff)
timestamp_t gen_cutoff)
{
struct topo_walk_info *info = revs->topo_walk_info;
struct commit *c;
@ -3367,6 +3367,9 @@ static void indegree_walk_step(struct rev_info *revs)
struct commit *parent = p->item;
int *pi = indegree_slab_at(&info->indegree, parent);
if (repo_parse_commit_gently(revs->repo, parent, 1) < 0)
return;
if (*pi)
(*pi)++;
else
@ -3380,7 +3383,7 @@ static void indegree_walk_step(struct rev_info *revs)
}
static void compute_indegrees_to_depth(struct rev_info *revs,
uint32_t gen_cutoff)
timestamp_t gen_cutoff)
{
struct topo_walk_info *info = revs->topo_walk_info;
struct commit *c;
@ -3438,7 +3441,7 @@ static void init_topo_walk(struct rev_info *revs)
info->min_generation = GENERATION_NUMBER_INFINITY;
for (list = revs->commits; list; list = list->next) {
struct commit *c = list->item;
uint32_t generation;
timestamp_t generation;
if (repo_parse_commit_gently(revs->repo, c, 1))
continue;
@ -3506,7 +3509,7 @@ static void expand_topo_walk(struct rev_info *revs, struct commit *commit)
for (p = commit->parents; p; p = p->next) {
struct commit *parent = p->item;
int *pi;
uint32_t generation;
timestamp_t generation;
if (parent->object.flags & UNINTERESTING)
continue;