diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 9398329706..8f79382562 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -14,6 +14,7 @@ endif::git-format-patch[] ifdef::git-format-patch[] -p:: +--no-stat:: Generate plain patches without any diffstats. endif::git-format-patch[] diff --git a/builtin-log.c b/builtin-log.c index ce7ab810c8..06424f3ca8 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -923,8 +923,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) "don't output binary diffs"), OPT_BOOLEAN(0, "ignore-if-in-upstream", &ignore_if_in_upstream, "don't include a patch matching a commit upstream"), - OPT_BOOLEAN('p', NULL, &use_patch_format, - "show patch format instead of default (patch + stat)"), + { OPTION_BOOLEAN, 'p', "no-stat", &use_patch_format, NULL, + "show patch format instead of default (patch + stat)", + PARSE_OPT_NONEG | PARSE_OPT_NOARG }, OPT_GROUP("Messaging"), { OPTION_CALLBACK, 0, "add-header", NULL, "header", "add email header", PARSE_OPT_NONEG,