From: Junio C Hamano Date: Mon, 12 Jan 2015 19:38:56 +0000 (-0800) Subject: Merge branch 'bc/fetch-thin-less-aggressive-in-normal-repository' X-Git-Tag: v2.3.0-rc0~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/832258da969fbedbbd1d474900dbdbdf23d4bca1?ds=inline;hp=-c Merge branch 'bc/fetch-thin-less-aggressive-in-normal-repository' Earlier we made "rev-list --object-edge" more aggressively list the objects at the edge commits, in order to reduce number of objects fetched into a shallow repository, but the change affected cases other than "fetching into a shallow repository" and made it unusably slow (e.g. fetching into a normal repository should not have to suffer the overhead from extra processing). Limit it to a more specific case by introducing --objects-edge-aggressive, a new option to rev-list. * bc/fetch-thin-less-aggressive-in-normal-repository: pack-objects: use --objects-edge-aggressive for shallow repos rev-list: add an option to mark fewer edges as uninteresting Documentation: add missing article in rev-list-options.txt --- 832258da969fbedbbd1d474900dbdbdf23d4bca1 diff --combined revision.c index 14e0e0358c,753dd2fca2..86406a26a2 --- a/revision.c +++ b/revision.c @@@ -1441,7 -1441,7 +1441,7 @@@ static void prepare_show_merge(struct r other = lookup_commit_or_die(sha1, "MERGE_HEAD"); add_pending_object(revs, &head->object, "HEAD"); add_pending_object(revs, &other->object, "MERGE_HEAD"); - bases = get_merge_bases(head, other, 1); + bases = get_merge_bases(head, other); add_rev_cmdline_list(revs, bases, REV_CMD_MERGE_BASE, UNINTERESTING | BOTTOM); add_pending_commit_list(revs, bases, UNINTERESTING | BOTTOM); free_commit_list(bases); @@@ -1546,7 -1546,7 +1546,7 @@@ int handle_revision_arg(const char *arg : lookup_commit_reference(b_obj->sha1)); if (!a || !b) goto missing; - exclude = get_merge_bases(a, b, 1); + exclude = get_merge_bases(a, b); add_rev_cmdline_list(revs, exclude, REV_CMD_MERGE_BASE, flags_exclude); @@@ -1853,6 -1853,12 +1853,12 @@@ static int handle_revision_opt(struct r 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;