aboutsummaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@googlemail.com>2013-08-03 13:51:18 +0200
committerJunio C Hamano <gitster@pobox.com>2013-08-05 11:32:17 -0700
commit4741edd549decfccc016fa4775b349fe94fdf4e5 (patch)
treefc5bfb57bf7065e7ca918dc45265840f54c7c18c /builtin/log.c
parente6b722db099f435f21ce72b18f0d61dc3c778f1f (diff)
downloadgit-4741edd549decfccc016fa4775b349fe94fdf4e5.tar.gz
git-4741edd549decfccc016fa4775b349fe94fdf4e5.tar.xz
Remove deprecated OPTION_BOOLEAN for parsing arguments
As of b04ba2bb4 OPTION_BOOLEAN was deprecated. This commit removes all occurrences of OPTION_BOOLEAN. In b04ba2bb4 Junio suggested to replace it with either OPTION_SET_INT or OPTION_COUNTUP instead. However a pattern, which occurred often with the OPTION_BOOLEAN was a hidden boolean parameter. So I defined OPT_HIDDEN_BOOL as an additional possible parse option in parse-options.h to make life easy. The OPT_HIDDEN_BOOL was used in checkout, clone, commit, show-ref. The only exception, where there was need to fiddle with OPTION_SET_INT was log and notes. However in these two files there is also a pattern, so we could think of introducing OPT_NONEG_BOOL. Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 2625f9881..05e374df4 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1183,9 +1183,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
N_("don't output binary diffs")),
OPT_BOOLEAN(0, "ignore-if-in-upstream", &ignore_if_in_upstream,
N_("don't include a patch matching a commit upstream")),
- { OPTION_BOOLEAN, 'p', "no-stat", &use_patch_format, NULL,
+ { OPTION_SET_INT, 'p', "no-stat", &use_patch_format, NULL,
N_("show patch format instead of default (patch + stat)"),
- PARSE_OPT_NONEG | PARSE_OPT_NOARG },
+ PARSE_OPT_NONEG | PARSE_OPT_NOARG, NULL, 1},
OPT_GROUP(N_("Messaging")),
{ OPTION_CALLBACK, 0, "add-header", NULL, N_("header"),
N_("add email header"), 0, header_callback },