rev-list: add an option to mark fewer edges as uninteresting
In commit fbd4a70 (list-objects: mark more commits as edges in
mark_edges_uninteresting - 2013-08-16), we marked an increasing number
of edges uninteresting. This change, and the subsequent change to make
this conditional on --objects-edge, are used by --thin to make much
smaller packs for shallow clones.
Unfortunately, they cause a significant performance regression when
pushing non-shallow clones with lots of refs (23.322 seconds vs.
4.785 seconds with 22400 refs). Add an option to git rev-list,
--objects-edge-aggressive, that preserves this more aggressive behavior,
while leaving --objects-edge to provide more performant behavior.
Preserve the current behavior for the moment by using the aggressive
option.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
8297643fcd
commit
1684c1b219
@ -157,7 +157,7 @@ void mark_edges_uninteresting(struct rev_info *revs, show_edge_fn show_edge)
|
||||
|
||||
if (commit->object.flags & UNINTERESTING) {
|
||||
mark_tree_uninteresting(commit->tree);
|
||||
if (revs->edge_hint && !(commit->object.flags & SHOWN)) {
|
||||
if (revs->edge_hint_aggressive && !(commit->object.flags & SHOWN)) {
|
||||
commit->object.flags |= SHOWN;
|
||||
show_edge(commit);
|
||||
}
|
||||
@ -165,7 +165,7 @@ void mark_edges_uninteresting(struct rev_info *revs, show_edge_fn show_edge)
|
||||
}
|
||||
mark_edge_parents_uninteresting(commit, revs, show_edge);
|
||||
}
|
||||
if (revs->edge_hint) {
|
||||
if (revs->edge_hint_aggressive) {
|
||||
for (i = 0; i < revs->cmdline.nr; i++) {
|
||||
struct object *obj = revs->cmdline.rev[i].item;
|
||||
struct commit *commit = (struct commit *)obj;
|
||||
|
||||
Reference in New Issue
Block a user