summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2016-09-04 20:18:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-09-07 19:29:53 (GMT)
commita46160d27ebdcd609aeae60b6163548af337d280 (patch)
treeb0a16824d7049e0298993212dccab0791cf13dc3 /builtin/apply.c
parent90875eca5a0b227e6a1be3ccece0a3da5e72017f (diff)
downloadgit-a46160d27ebdcd609aeae60b6163548af337d280.zip
git-a46160d27ebdcd609aeae60b6163548af337d280.tar.gz
git-a46160d27ebdcd609aeae60b6163548af337d280.tar.bz2
apply: make it possible to silently apply
This changes 'int apply_verbosely' into 'enum apply_verbosity', and changes the possible values of the variable from a bool to a tristate. The previous 'false' state is changed into 'verbosity_normal'. The previous 'true' state is changed into 'verbosity_verbose'. The new added state is 'verbosity_silent'. It should prevent anything to be printed on both stderr and stdout. This is needed because `git am` wants to first call apply functionality silently, if it can then fall back on 3-way merge in case of error. Printing on stdout, and calls to warning() or error() are not taken care of in this patch, as that will be done in following patches. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/apply.c')
-rw-r--r--builtin/apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 9c66474..7338701 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -74,7 +74,7 @@ int cmd_apply(int argc, const char **argv, const char *prefix)
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_verbosely, N_("be verbose")),
+ OPT__VERBOSE(&state.apply_verbosity, N_("be verbose")),
OPT_BIT(0, "inaccurate-eof", &options,
N_("tolerate incorrectly detected missing new-line at the end of file"),
APPLY_OPT_INACCURATE_EOF),