Re: [PATCH v4 03/13] revision: put object filter into struct rev_info
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 9, 2022, 18:48 UTC
- Message-ID
- <xmqqsfrrklng.fsf@gitster.g>
- In-Reply-To
- <4ac09ddbfaa3f8aad2b77c7b250f6953a3ff9f24.1646841703.git.gitgitgadget@gmail.com>
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 21 quoted lines
> diff --git a/revision.h b/revision.h
> index 3c58c18c63a..b1669a8cc33 100644
> --- a/revision.h
> +++ b/revision.h
> @@ -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;I wondered if s/zero/LOFC_DISABLED/ would make it more helpful, but seeing changes like the one i the later "parse filter capability" step, which can just become
- if (header->filter.choice != LOFC_DISABLED) {
+ if (header->filter.choice) {
... do things ...relative to the previous round, I think what is in the posted patch indeed is a better way to help developers.