summaryrefslogtreecommitdiffstats
path: root/builtin/am.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-06-01 08:06:38 +0200
committerJunio C Hamano <gitster@pobox.com>2018-06-01 08:06:38 +0200
commite1149fd7d95e3b63f56d4360e135428fc3f7eb82 (patch)
tree21a585696e84b23bdc087ae87e85278c1f22b754 /builtin/am.c
parentMerge branch 'pa/import-tars-long-names' (diff)
parentUse OPT_SET_INT_F() for cmdline option specification (diff)
downloadgit-e1149fd7d95e3b63f56d4360e135428fc3f7eb82.tar.xz
git-e1149fd7d95e3b63f56d4360e135428fc3f7eb82.zip
Merge branch 'nd/use-opt-int-set-f'
Code simplification. * nd/use-opt-int-set-f: Use OPT_SET_INT_F() for cmdline option specification
Diffstat (limited to 'builtin/am.c')
-rw-r--r--builtin/am.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/am.c b/builtin/am.c
index aa989e7390..2fc2d1e82c 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -2231,12 +2231,12 @@ int cmd_am(int argc, const char **argv, const char *prefix)
N_("pass -b flag to git-mailinfo"), KEEP_NON_PATCH),
OPT_BOOL('m', "message-id", &state.message_id,
N_("pass -m flag to git-mailinfo")),
- { OPTION_SET_INT, 0, "keep-cr", &keep_cr, NULL,
- N_("pass --keep-cr flag to git-mailsplit for mbox format"),
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 1},
- { OPTION_SET_INT, 0, "no-keep-cr", &keep_cr, NULL,
- N_("do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"),
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 0},
+ OPT_SET_INT_F(0, "keep-cr", &keep_cr,
+ N_("pass --keep-cr flag to git-mailsplit for mbox format"),
+ 1, PARSE_OPT_NONEG),
+ OPT_SET_INT_F(0, "no-keep-cr", &keep_cr,
+ N_("do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"),
+ 0, PARSE_OPT_NONEG),
OPT_BOOL('c', "scissors", &state.scissors,
N_("strip everything before a scissors line")),
OPT_PASSTHRU_ARGV(0, "whitespace", &state.git_apply_opts, N_("action"),