Re: [PATCH 04/19] Convert struct diff_options to use struct pathspec
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Dec 14, 2010, 05:02 UTC
- Message-ID
- <AANLkTim_SfWQ4OTsj0Are8kJGbiOLoj1wTa92qhb0KJA@mail.gmail.com>
- In-Reply-To
- <7vhbeh1oru.fsf@alter.siamese.dyndns.org>
2010/12/14 Junio C Hamano <gitster@pobox.com>:
Show 19 quoted lines
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>
>> diff --git a/diff-lib.c b/diff-lib.c
>> index 392ce2b..3b809f2 100644
>> --- a/diff-lib.c
>> +++ b/diff-lib.c
>> @@ -501,7 +501,7 @@ int do_diff_cache(const unsigned char *tree_sha1, struct diff_options *opt)
>> active_nr = dst - active_cache;
>>
>> init_revisions(&revs, NULL);
>> - revs.prune_data = opt->paths;
>> + revs.prune_data = opt->pathspec.raw;
>> tree = parse_tree_indirect(tree_sha1);
>> if (!tree)
>> die("bad tree object %s", sha1_to_hex(tree_sha1));
>
> Hopefully the prune_data will become opt->pathspec not "raw" and use your
> generalied/unified pathspec matching code in later patches in the series,
> yes?Yes. But that needs closer look. "prune_data" is void* and casted in many places. Compiler won't catch mistyping for us.
-- Duy