Skip to content

Commit

Permalink
Merge branch 'jc/am-parseopt-fix'
Browse files Browse the repository at this point in the history
Code simplification.

* jc/am-parseopt-fix:
  am: simplify parsing of "--[no-]keep-cr"
  • Loading branch information
gitster committed Jul 26, 2023
2 parents 8ae477e + 947ebd6 commit 914a353
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions builtin/am.c
Original file line number Diff line number Diff line change
Expand Up @@ -2347,12 +2347,9 @@ 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")),
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_SET_INT(0, "keep-cr", &keep_cr,
N_("pass --keep-cr flag to git-mailsplit for mbox format"),
1),
OPT_BOOL('c', "scissors", &state.scissors,
N_("strip everything before a scissors line")),
OPT_CALLBACK_F(0, "quoted-cr", &state.quoted_cr, N_("action"),
Expand Down

0 comments on commit 914a353

Please sign in to comment.