summaryrefslogtreecommitdiff
path: root/pack-bitmap-write.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2020-12-08 22:04:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-12-08 22:48:17 (GMT)
commit928e3f42adc032ce7b7c1323408648d2b6713509 (patch)
treee2b09588ee112522d012898ab19d08820e689b52 /pack-bitmap-write.c
parent1467b9572aa57c1369aaac897fcbbddde4080d75 (diff)
downloadgit-928e3f42adc032ce7b7c1323408648d2b6713509.zip
git-928e3f42adc032ce7b7c1323408648d2b6713509.tar.gz
git-928e3f42adc032ce7b7c1323408648d2b6713509.tar.bz2
pack-bitmap-write: rename children to reverse_edges
The bitmap_builder_init() method walks the reachable commits in topological order and constructs a "reverse graph" along the way. At the moment, this reverse graph contains an edge from commit A to commit B if and only if A is a parent of B. Thus, the name "children" is appropriate for for this reverse graph. In the next change, we will repurpose the reverse graph to not be directly-adjacent commits in the commit-graph, but instead a more abstract relationship. The previous changes have already incorporated the necessary updates to fill_bitmap_commit() that allow these edges to not be immediate children. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap-write.c')
-rw-r--r--pack-bitmap-write.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index 9576392..7e218d0 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -179,7 +179,7 @@ static void compute_xor_offsets(void)
}
struct bb_commit {
- struct commit_list *children;
+ struct commit_list *reverse_edges;
struct bitmap *bitmap;
unsigned selected:1;
unsigned idx; /* within selected array */
@@ -228,7 +228,7 @@ static void bitmap_builder_init(struct bitmap_builder *bb,
for (p = commit->parents; p; p = p->next) {
struct bb_commit *ent = bb_data_at(&bb->data, p->item);
- commit_list_insert(commit, &ent->children);
+ commit_list_insert(commit, &ent->reverse_edges);
}
}
}
@@ -358,7 +358,7 @@ void bitmap_writer_build(struct packing_data *to_pack)
display_progress(writer.progress, nr_stored);
}
- while ((child = pop_commit(&ent->children))) {
+ while ((child = pop_commit(&ent->reverse_edges))) {
struct bb_commit *child_ent =
bb_data_at(&bb.data, child);