diff options
| author | Matthew DeVore <matvore@google.com> | 2018-12-03 14:10:19 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-12-06 14:52:56 +0900 |
| commit | bbcde41a70a7e0264c214896aac84d1ec3fdcbf6 (patch) | |
| tree | a43a0775df8d2cc095b39ddd9cefd94c4d7c11dc /builtin/pack-objects.c | |
| parent | 669b1d2aaec73ba762bf566078308075886ca208 (diff) | |
| download | git-bbcde41a70a7e0264c214896aac84d1ec3fdcbf6.tar.gz | |
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 <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pack-objects.c')
| -rw-r--r-- | builtin/pack-objects.c | 6 |
1 files changed, 4 insertions, 2 deletions
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(); |
