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/rev-list.c | |
parent | exclude-promisor-objects: declare when option is allowed (diff) | |
download | tgif-bbcde41a70a7e0264c214896aac84d1ec3fdcbf6.tar.xz |
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/rev-list.c')
-rw-r--r-- | builtin/rev-list.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c index c8f3ac8d09..807a50a2fb 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -357,6 +357,9 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix) { struct rev_info revs; struct rev_list_info info; + struct setup_revision_opt s_r_opt = { + .allow_exclude_promisor_objects = 1, + }; int i; int bisect_list = 0; int bisect_show_vars = 0; @@ -370,7 +373,6 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix) git_config(git_default_config, NULL); init_revisions(&revs, prefix); revs.abbrev = DEFAULT_ABBREV; - revs.allow_exclude_promisor_objects_opt = 1; revs.commit_format = CMIT_FMT_UNSPECIFIED; /* @@ -401,7 +403,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix) } } - argc = setup_revisions(argc, argv, &revs, NULL); + argc = setup_revisions(argc, argv, &revs, &s_r_opt); memset(&info, 0, sizeof(info)); info.revs = &revs; |