Skip to content

Commit 928e3f4

Browse files
derrickstoleegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1467b95 commit 928e3f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pack-bitmap-write.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static void compute_xor_offsets(void)
179179
}
180180

181181
struct bb_commit {
182-
struct commit_list *children;
182+
struct commit_list *reverse_edges;
183183
struct bitmap *bitmap;
184184
unsigned selected:1;
185185
unsigned idx; /* within selected array */
@@ -228,7 +228,7 @@ static void bitmap_builder_init(struct bitmap_builder *bb,
228228

229229
for (p = commit->parents; p; p = p->next) {
230230
struct bb_commit *ent = bb_data_at(&bb->data, p->item);
231-
commit_list_insert(commit, &ent->children);
231+
commit_list_insert(commit, &ent->reverse_edges);
232232
}
233233
}
234234
}
@@ -358,7 +358,7 @@ void bitmap_writer_build(struct packing_data *to_pack)
358358
display_progress(writer.progress, nr_stored);
359359
}
360360

361-
while ((child = pop_commit(&ent->children))) {
361+
while ((child = pop_commit(&ent->reverse_edges))) {
362362
struct bb_commit *child_ent =
363363
bb_data_at(&bb.data, child);
364364

0 commit comments

Comments
 (0)