From: "Björn Gustavsson" <bgustavsson@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 4/4] format-patch: Add "--no-stat" as a synonym for "-p"
Date: Sat, 07 Nov 2009 10:58:55 +0100 [thread overview]
Message-ID: <4AF544DF.6070404@gmail.com> (raw)
"-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>
---
This patch is new.
Unfortunately, we must allow --no-stat and --stat (or alternatively
complicate the implementation to allow -p and --stat, but not
--no-stat and --stat). If that seems too strange, perhaps we are
better off without this patch.
Documentation/diff-options.txt | 1 +
builtin-log.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 9398329..c4d65ba 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 9df8dac..968a038 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -925,7 +925,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
"show patch format instead of default (patch + stat)"),
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,
+ OPT_BOOLEAN('p', "no-stat", &use_patch_format,
"show patch format instead of default (patch + stat)"),
OPT_GROUP("Messaging"),
{ OPTION_CALLBACK, 0, "add-header", NULL, "header",
--
1.6.5.1.69.g36942
next reply other threads:[~2009-11-07 9:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-07 9:58 Björn Gustavsson [this message]
2009-11-08 23:11 ` [PATCH 4/4] format-patch: Add "--no-stat" as a synonym for "-p" Stephen Boyd
2009-11-09 6:22 ` Björn Gustavsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AF544DF.6070404@gmail.com \
--to=bgustavsson@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.