diff mbox series

[V2] git-apply: add --quiet flag

Message ID 20210728032230.24611-1-jerry@skydio.com (mailing list archive)
State New
Headers show
Series [V2] git-apply: add --quiet flag | expand

Commit Message

Jerry Zhang July 28, 2021, 3:22 a.m. UTC

This adds a --quiet flag to "git apply" so
the user can turn down the verbosity.

Signed-off-by: Jerry Zhang <jerry@skydio.com>
V1->V2: rebase on master and rerun tests

 Documentation/git-apply.txt | 7 ++++++-
 apply.c                     | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
diff mbox series


diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index aa1ae56a25..a32ad64718 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -16,7 +16,7 @@  SYNOPSIS
 	  [--ignore-space-change | --ignore-whitespace]
 	  [--exclude=<path>] [--include=<path>] [--directory=<root>]
-	  [--verbose] [--unsafe-paths] [<patch>...]
+	  [--verbose | --quiet] [--unsafe-paths] [<patch>...]
@@ -228,6 +228,11 @@  behavior:
 	current patch being applied will be printed. This option will cause
 	additional information to be reported.
+	Suppress stderr output. Messages about patch status and progress
+	will not be printed.
 	Do not trust the line counts in the hunk headers, but infer them
 	by inspecting the patch (e.g. after editing the patch without
diff --git a/apply.c b/apply.c
index fb321c707b..d530c3eb47 100644
--- a/apply.c
+++ b/apply.c
@@ -5051,7 +5051,7 @@  int apply_parse_options(int argc, const char **argv,
 			N_("leave the rejected hunks in corresponding *.rej files")),
 		OPT_BOOL(0, "allow-overlap", &state->allow_overlap,
 			N_("allow overlapping hunks")),
-		OPT__VERBOSE(&state->apply_verbosity, N_("be verbose")),
+		OPT__VERBOSITY(&state->apply_verbosity),
 		OPT_BIT(0, "inaccurate-eof", options,
 			N_("tolerate incorrectly detected missing new-line at the end of file"),