From d09cd15d19de23aca532a85f6d27a71b2baceb3f Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Tue, 16 Jul 2013 10:05:36 +0200 Subject: diff: allow --no-patch as synonym for -s This follows the usual convention of having a --no-foo option to negate --foo. Signed-off-by: Matthieu Moy Reviewed-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'diff.c') diff --git a/diff.c b/diff.c index f0b3e7cfe3..cc41d88c98 100644 --- a/diff.c +++ b/diff.c @@ -3540,7 +3540,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac) options->output_format |= DIFF_FORMAT_NAME; else if (!strcmp(arg, "--name-status")) options->output_format |= DIFF_FORMAT_NAME_STATUS; - else if (!strcmp(arg, "-s")) + else if (!strcmp(arg, "-s") || !strcmp(arg, "--no-patch")) options->output_format |= DIFF_FORMAT_NO_OUTPUT; else if (!prefixcmp(arg, "--stat")) /* --stat, --stat-width, --stat-name-width, or --stat-count */ -- cgit v1.2.1