Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Gustavsson <bgustavsson@gmail.com>2009-11-07 12:58:55 +0300
committerJunio C Hamano <gitster@pobox.com>2009-11-10 22:47:30 +0300
commit2cfa8330e414bc73b01d45f232f8566afc56dd10 (patch)
treec899b332a39df26e194d4b94610fed850f05d1d7 /builtin-log.c
parentdce5ef142046e107e20aa03ca5a353032bbf9653 (diff)
format-patch: Add "--no-stat" as a synonym for "-p"
"-p" means "generate patch" in 'git log' and 'git diff', so it's quite surprising that it means "suppress diffstat" in 'git format-patch'. Keep the "-p" option for backward compatibility, but add "--no-stat" as a more intuitive synonym. For backward compatibility with scripts, we must allow combinations of --stat and --no-stat. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c5
1 files changed, 3 insertions, 2 deletions
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,