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>
This commit is contained in:

committed by
Junio C Hamano

parent
669b1d2aae
commit
bbcde41a70
@ -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();
|
||||
|
Reference in New Issue
Block a user