Re: [PATCH] log: add log.excludeDecoration config option
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Apr 14, 2020, 16:00 UTC
- Message-ID
- <31e24f9f-44b0-d0f7-3d81-12365edf7a40@gmail.com>
- In-Reply-To
- <20200414154513.GB93424@syl.local>
On 4/14/2020 11:45 AM, Taylor Blau wrote:
Show 33 quoted lines
> On Tue, Apr 14, 2020 at 11:10:33AM -0400, Derrick Stolee wrote:
>>>> log.follow::
>>>> If `true`, `git log` will act as if the `--follow` option was used when
>>>> a single <path> is given. This has the same limitations as `--follow`,
>>>> diff --git a/builtin/log.c b/builtin/log.c
>>>> index 83a4a6188e2..d7d1d5b7143 100644
>>>> --- a/builtin/log.c
>>>> +++ b/builtin/log.c
>>>> @@ -236,7 +236,21 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
>>>> }
>>>>
>>>> if (decoration_style) {
>>>> + const struct string_list *config_exclude =
>>>> + repo_config_get_value_multi(the_repository,
>>>> + "log.excludeDecoration");
>>>> +
>>>> + if (config_exclude) {
>>>> + struct string_list_item *item;
>>>> + for (item = config_exclude->items;
>>>> + item && item < config_exclude->items + config_exclude->nr;
>>>> + item++)
>>>
>>> Any reason not to use the 'for_each_string_list_item' macro in
>>> 'string-list.h' for this?
>>
>> The reason is I forgot about it.
>
> Heh, in fairness I forgot about it, too :). I thought that this code
> looked familiar, but it was only luck that I had 'string-list.h' open at
> the time I was reading this.
>
> I don't think that it really matters much each way, but if you're
> already re-rolling...This is probably worth a re-roll on its own. I'll give the patch some extra time to simmer before pushing a v2, though.
-Stolee