Re: [PATCH v4 03/13] revision: put object filter into struct rev_info
From: Junio C Hamano <hidden>
Date: 2022-03-09 18:48:08
"Derrick Stolee via GitGitGadget" [off-list ref] writes:
quoted hunk
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.