Ever since 2e5e98a40 ([PATCH] Silent flag for show-diff, 2005-04-13) -s meant silent. Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx> --- Documentation/diff-options.txt | 1 + diff.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index ba04b8292a..a402b6f9b6 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -34,6 +34,7 @@ ifdef::git-diff[] endif::git-diff[] -s:: +--silent:: Suppress diff output. Useful for commands like `git show` that show output by default. endif::git-format-patch[] diff --git a/diff.c b/diff.c index 45c860496f..d171f155b1 100644 --- a/diff.c +++ b/diff.c @@ -5493,7 +5493,7 @@ struct option *add_diff_options(const struct option *opts, OPT_BITOP('p', "patch", &options->output_format, N_("generate patch"), DIFF_FORMAT_PATCH, DIFF_FORMAT_DEFAULT | DIFF_FORMAT_NO_OUTPUT), - OPT_SET_INT_F('s', NULL, &options->output_format, + OPT_SET_INT_F('s', "silent", &options->output_format, N_("suppress diff output"), DIFF_FORMAT_NO_OUTPUT, PARSE_OPT_NONEG), OPT_BITOP(0, "no-patch", &options->output_format, -- 2.40.0+fc1