Matthieu Moy wrote: > diff.c | 14 ++++++++++++++ > 1 files changed, 14 insertions(+), 0 deletions(-) Just some nitpicks: > +++ b/diff.c > @@ -3071,6 +3071,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac) > else if (!strcmp(arg, "-s")) > options->output_format |= DIFF_FORMAT_NO_OUTPUT; > else if (!prefixcmp(arg, "--stat")) { > + argcount = 1; > char *end; declaration after statement. > @@ -3079,8 +3080,20 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac) > > switch (*arg) { > case '-': > + if (!strcmp(arg, "-width")) { > + if (!av[1]) > + die("Option `--stat-width' requires a value"); > + width = strtoul(av[1], &end, 10); > + argcount = 2; > + } > if (!prefixcmp(arg, "-width=")) Could save an extra string comparison with an "else" here. [...] > + name_width = strtoul(av[1], &end, 10); > + argcount = 2; > + } Whitespace damage: trailing tabs. How about something like the following? Jonathan Nieder (1): diff: split off a function for --stat-* option parsing Matthieu Moy (1): diff: allow --stat-width n, --stat-name-width n diff.c | 80 ++++++++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 53 insertions(+), 27 deletions(-) -- 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