Re: [PATCH 12/17] revert: Save command-line options for continuing operation

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

 



Ramkumar Ramachandra <artagnon@xxxxxxxxx> writes:

> +	die(_("Malformed options sheet: %s"), git_path(SEQ_OPTS_FILE));
> +}
> +
> +static void read_populate_opts(struct replay_opts **opts_ptr)

It would make sense to refactor config.c:git_parse_file() to be easier to
use, rename it to be more descriptive (it should be a function that takes
a struct that holds these fields

        static FILE *config_file;
        static const char *config_file_name;
        static int config_linenr;
        static int config_file_eof;

in addition to the callback "fn" and callback "data", expects the file to
be in something similar to the .ini format, parses it with the help from
the callback function), and use it here, without rolling your own.

Also I get

builtin/revert.c:682: error: 'read_populate_todo' defined but not used
builtin/revert.c:848: error: 'read_populate_opts' defined but not used

at this step in the series, which is not quite optimal.
--
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]