From a46160d27ebdcd609aeae60b6163548af337d280 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Sun, 4 Sep 2016 22:18:25 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- builtin/apply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/apply.c') diff --git a/builtin/apply.c b/builtin/apply.c index 9c66474958..7338701434 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), -- cgit v1.2.1