From: Junio C Hamano Date: Tue, 02 Sep 2008 06:57:46 GMT Subject: Re: [PATCH] Add --filedirstat diff option Message-ID: <7vd4jnnifp.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080901011259.GA31696@zakalwe.fi> Heikki Orsila writes: > @@ -2474,7 +2478,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac) > options->output_format |= DIFF_FORMAT_DIRSTAT; > else if (!strcmp(arg, "--cumulative")) > options->output_format |= DIFF_FORMAT_CUMULATIVE; > - else if (!strcmp(arg, "--check")) > + else if (opt_arg(arg, 'X', "filedirstat", &options->dirstat_percent)) { > + options->output_format |= DIFF_FORMAT_DIRSTAT; > + options->filedirstat = 1; Why 'X'? It would never match, confusing to the reader, and risks a sudden change in behaviour when these statements are reordered or somebody mechanically attempts to convert this to parse_options().