diff options
-rw-r--r-- | Documentation/git-rev-list.txt | 3 | ||||
-rw-r--r-- | Documentation/rev-list-options.txt | 4 | ||||
-rw-r--r-- | builtin/pack-objects.c | 2 | ||||
-rw-r--r-- | list-objects.c | 4 | ||||
-rw-r--r-- | revision.c | 6 | ||||
-rw-r--r-- | revision.h | 1 |
6 files changed, 16 insertions, 4 deletions
diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt index fd7f8b5bc1..5b119220bf 100644 --- a/Documentation/git-rev-list.txt +++ b/Documentation/git-rev-list.txt @@ -46,7 +46,8 @@ SYNOPSIS [ \--extended-regexp | -E ] [ \--fixed-strings | -F ] [ \--date=(local|relative|default|iso|iso-strict|rfc|short) ] - [ [\--objects | \--objects-edge] [ \--unpacked ] ] + [ [ \--objects | \--objects-edge | \--objects-edge-aggressive ] + [ \--unpacked ] ] [ \--pretty | \--header ] [ \--bisect ] [ \--bisect-vars ] diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 2277fcbb89..8cb6f92e19 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -657,6 +657,10 @@ These options are mostly targeted for packing of Git repositories. objects in deltified form based on objects contained in these excluded commits to reduce network traffic. +--objects-edge-aggressive:: + Similar to `--objects-edge`, but it tries harder to find excluded + commits at the cost of increased time. + --unpacked:: Only useful with `--objects`; print the object IDs that are not in packs. diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 3f9f5c7760..f93a17c465 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -2711,7 +2711,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) argv_array_push(&rp, "pack-objects"); if (thin) { use_internal_rev_list = 1; - argv_array_push(&rp, "--objects-edge"); + argv_array_push(&rp, "--objects-edge-aggressive"); } else argv_array_push(&rp, "--objects"); diff --git a/list-objects.c b/list-objects.c index 2910becd6c..2a139b6ced 100644 --- a/list-objects.c +++ b/list-objects.c @@ -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; diff --git a/revision.c b/revision.c index 75dda928ea..753dd2fca2 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; diff --git a/revision.h b/revision.h index 9cb5adc4ea..033a24460e 100644 --- a/revision.h +++ b/revision.h @@ -93,6 +93,7 @@ struct rev_info { blob_objects:1, verify_objects:1, edge_hint:1, + edge_hint_aggressive:1, limited:1, unpacked:1, boundary:2, |