summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2014-12-24 23:05:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-12-29 17:57:55 (GMT)
commit1684c1b219e02c91655ad929f752f4f864c72faf (patch)
tree8c5c581b502587f2f4be3e375a37c43152210fc3 /revision.c
parent8297643fcdb0e0f1edaff1fe026210dc6e073176 (diff)
downloadgit-1684c1b219e02c91655ad929f752f4f864c72faf.zip
git-1684c1b219e02c91655ad929f752f4f864c72faf.tar.gz
git-1684c1b219e02c91655ad929f752f4f864c72faf.tar.bz2
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>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/revision.c b/revision.c
index 75dda92..753dd2f 100644
--- a/revision.c
+++ b/revision.c
@@ -1853,6 +1853,12 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
revs->tree_objects = 1;
revs->blob_objects = 1;
revs->edge_hint = 1;
+ } else if (!strcmp(arg, "--objects-edge-aggressive")) {
+ revs->tag_objects = 1;
+ revs->tree_objects = 1;
+ revs->blob_objects = 1;
+ revs->edge_hint = 1;
+ revs->edge_hint_aggressive = 1;
} else if (!strcmp(arg, "--verify-objects")) {
revs->tag_objects = 1;
revs->tree_objects = 1;