Skip to content

Commit c21b8ae

Browse files
jerry-skydiogitster
authored andcommitted
git-apply: add --quiet flag
Replace OPT_VERBOSE with OPT_VERBOSITY. This adds a --quiet flag to "git apply" so the user can turn down the verbosity. Signed-off-by: Jerry Zhang <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e773545 commit c21b8ae

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Documentation/git-apply.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ SYNOPSIS
1616
[--ignore-space-change | --ignore-whitespace]
1717
[--whitespace=(nowarn|warn|fix|error|error-all)]
1818
[--exclude=<path>] [--include=<path>] [--directory=<root>]
19-
[--verbose] [--unsafe-paths] [<patch>...]
19+
[--verbose | --quiet] [--unsafe-paths] [<patch>...]
2020

2121
DESCRIPTION
2222
-----------
@@ -228,6 +228,11 @@ behavior:
228228
current patch being applied will be printed. This option will cause
229229
additional information to be reported.
230230

231+
-q::
232+
--quiet::
233+
Suppress stderr output. Messages about patch status and progress
234+
will not be printed.
235+
231236
--recount::
232237
Do not trust the line counts in the hunk headers, but infer them
233238
by inspecting the patch (e.g. after editing the patch without

apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5071,7 +5071,7 @@ int apply_parse_options(int argc, const char **argv,
50715071
N_("leave the rejected hunks in corresponding *.rej files")),
50725072
OPT_BOOL(0, "allow-overlap", &state->allow_overlap,
50735073
N_("allow overlapping hunks")),
5074-
OPT__VERBOSE(&state->apply_verbosity, N_("be verbose")),
5074+
OPT__VERBOSITY(&state->apply_verbosity),
50755075
OPT_BIT(0, "inaccurate-eof", options,
50765076
N_("tolerate incorrectly detected missing new-line at the end of file"),
50775077
APPLY_OPT_INACCURATE_EOF),

0 commit comments

Comments
 (0)