On Mon, Apr 25, 2016 at 11:50 PM, Stefan Beller <[email protected]> wrote:
> On Sun, Apr 24, 2016 at 6:33 AM, Christian Couder
> <[email protected]> wrote:
>
>> @@ -4630,9 +4644,10 @@ static int option_parse_whitespace(const struct 
>> option *opt,
>>  static int option_parse_directory(const struct option *opt,
>>                                   const char *arg, int unset)
>>  {
>> -       strbuf_reset(&root);
>> -       strbuf_addstr(&root, arg);
>> -       strbuf_complete(&root, '/');
>> +       struct apply_state *state = opt->value;
>
> Or even
>
>     struct strbuf root = ((state*)opt->value)->root;
>
> and then keep the next lines as is?

I found it more coherent to have all the option_parse_*() functions do:

    struct apply_state *state = opt->value;

as their first instruction.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to