Re: [PATCH v3 08/12] bundle: parse filter capability
- From
Derrick Stolee <derrickstolee@github.com>
- Date
- Mar 9, 2022, 14:35 UTC
- Message-ID
- <98fac88f-71cc-4214-cdb0-4a081a6702f9@github.com>
- In-Reply-To
- <xmqq4k48nyjn.fsf@gitster.g>
On 3/8/2022 12:29 PM, Junio C Hamano wrote:
Show 27 quoted lines
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> diff --git a/bundle.h b/bundle.h
>> index 06009fe6b1f..7fef2108f43 100644
>> --- a/bundle.h
>> +++ b/bundle.h
>> @@ -4,12 +4,14 @@
>> #include "strvec.h"
>> #include "cache.h"
>> #include "string-list.h"
>> +#include "list-objects-filter-options.h"
>>
>> struct bundle_header {
>> unsigned version;
>> struct string_list prerequisites;
>> struct string_list references;
>> const struct git_hash_algo *hash_algo;
>> + struct list_objects_filter_options filter;
>> };
>
> This used to be a pointer to the struct, with "NULL means do not
> filter" semantics, with .nr==0 as BUG(). Which was the same
> justification used when an earlier step added a pointer to the
> filter struct to rev_info.
>
> Should the same logic applies there to make it into an embedded
> struct in rev_info as well?You're absolutely right. Making the change will make the range-diff look absolutely horrid, but the change isn't terribly hard for the most part.
Thanks, -Stolee