Re: [PATCH 11/18] revert: Save command-line options for continuing operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Christian Couder writes:
> On Thursday 28 July 2011 18:52:24 Ramkumar Ramachandra wrote:
>> +     if (opts->mainline) {
>> +             strbuf_reset(&buf);
>
> It is not necessary to reset &buf here.
>
>> +             strbuf_addf(&buf, "%d", opts->mainline);
>> +             git_config_set_in_file(opts_file, "options.mainline", buf.buf);
>> +     }
>
> And perhaps it would be clearer if it was:
>
> +       if (opts->mainline) {
> +               struct strbuf buf = STRBUF_INIT;
> +               strbuf_addf(&buf, "%d", opts->mainline);
> +               git_config_set_in_file(opts_file, "options.mainline", buf.buf);
> +               strbuf_release(&buf);
> +       }

Much clearer.  Fixed.

>> +     if (opts->strategy)
>> +             git_config_set_in_file(opts_file, "options.strategy", opts->strategy);
>> +     if (opts->xopts) {
>
> Other nit: maybe you could put "int i" here, instead of at the beginning of
> the function.

Fixed.  Thanks.

-- Ram
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]