Skip to content

Commit 914a353

Browse files
committed
Merge branch 'jc/am-parseopt-fix'
Code simplification. * jc/am-parseopt-fix: am: simplify parsing of "--[no-]keep-cr"
2 parents 8ae477e + 947ebd6 commit 914a353

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

builtin/am.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,12 +2347,9 @@ int cmd_am(int argc, const char **argv, const char *prefix)
23472347
N_("pass -b flag to git-mailinfo"), KEEP_NON_PATCH),
23482348
OPT_BOOL('m', "message-id", &state.message_id,
23492349
N_("pass -m flag to git-mailinfo")),
2350-
OPT_SET_INT_F(0, "keep-cr", &keep_cr,
2351-
N_("pass --keep-cr flag to git-mailsplit for mbox format"),
2352-
1, PARSE_OPT_NONEG),
2353-
OPT_SET_INT_F(0, "no-keep-cr", &keep_cr,
2354-
N_("do not pass --keep-cr flag to git-mailsplit independent of am.keepcr"),
2355-
0, PARSE_OPT_NONEG),
2350+
OPT_SET_INT(0, "keep-cr", &keep_cr,
2351+
N_("pass --keep-cr flag to git-mailsplit for mbox format"),
2352+
1),
23562353
OPT_BOOL('c', "scissors", &state.scissors,
23572354
N_("strip everything before a scissors line")),
23582355
OPT_CALLBACK_F(0, "quoted-cr", &state.quoted_cr, N_("action"),

0 commit comments

Comments
 (0)