From bbcde41a70a7e0264c214896aac84d1ec3fdcbf6 Mon Sep 17 00:00:00 2001 From: Matthew DeVore Date: Mon, 3 Dec 2018 14:10:19 -0800 Subject: revision.c: put promisor option in specialized struct Put the allow_exclude_promisor_objects flag in setup_revision_opt. When it was in rev_info, it was unclear when it was used, since rev_info is passed to functions that don't use the flag. This resulted in unnecessary setting of the flag in prune.c, so fix that as well. Signed-off-by: Matthew DeVore Signed-off-by: Junio C Hamano --- builtin/pack-objects.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'builtin/pack-objects.c') diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 8ac8ca1d26..4408807e62 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -2848,13 +2848,15 @@ static void record_recent_commit(struct commit *commit, void *data) static void get_object_list(int ac, const char **av) { struct rev_info revs; + struct setup_revision_opt s_r_opt = { + .allow_exclude_promisor_objects = 1, + }; char line[1000]; int flags = 0; init_revisions(&revs, NULL); save_commit_buffer = 0; - revs.allow_exclude_promisor_objects_opt = 1; - setup_revisions(ac, av, &revs, NULL); + setup_revisions(ac, av, &revs, &s_r_opt); /* make sure shallows are read */ is_repository_shallow(); -- cgit v1.2.3