revision: put object filter into struct rev_info

Placing a 'struct list_objects_filter_options' within 'struct rev_info'
will assist making some bookkeeping around object filters in the future.

For now, let's use this new member to remove a static global instance of
the struct from builtin/rev-list.c.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Derrick Stolee
2022-03-09 16:01:33 +00:00
committed by Junio C Hamano
parent 4a4c3f9b63
commit ffaa137f64
2 changed files with 19 additions and 14 deletions

View File

@ -8,6 +8,7 @@
#include "pretty.h"
#include "diff.h"
#include "commit-slab-decl.h"
#include "list-objects-filter-options.h"
/**
* The revision walking API offers functions to build a list of revisions
@ -94,6 +95,12 @@ struct rev_info {
/* The end-points specified by the end user */
struct rev_cmdline_info cmdline;
/*
* Object filter options. No filtering is specified
* if and only if filter.choice is zero.
*/
struct list_objects_filter_options filter;
/* excluding from --branches, --refs, etc. expansion */
struct string_list *ref_excludes;