| 2310 | } |
| 2311 | |
| 2312 | int cmd_am(int argc, |
| 2313 | const char **argv, |
| 2314 | const char *prefix, |
| 2315 | struct repository *repo UNUSED) |
| 2316 | { |
| 2317 | struct am_state state; |
| 2318 | int binary = -1; |
| 2319 | int keep_cr = -1; |
| 2320 | int patch_format = PATCH_FORMAT_UNKNOWN; |
| 2321 | enum resume_type resume_mode = RESUME_FALSE; |
| 2322 | int in_progress; |
| 2323 | int ret = 0; |
| 2324 | |
| 2325 | const char * const usage[] = { |
| 2326 | N_("git am [<options>] [(<mbox> | <Maildir>)...]"), |
| 2327 | N_("git am [<options>] (--continue | --skip | --abort)"), |
| 2328 | NULL |
| 2329 | }; |
| 2330 | |
| 2331 | struct option options[] = { |
| 2332 | OPT_BOOL('i', "interactive", &state.interactive, |
| 2333 | N_("run interactively")), |
| 2334 | OPT_BOOL('n', "no-verify", &state.no_verify, |
| 2335 | N_("bypass pre-applypatch and applypatch-msg hooks")), |
| 2336 | OPT_HIDDEN_BOOL('b', "binary", &binary, |
| 2337 | N_("historical option -- no-op")), |
| 2338 | OPT_BOOL('3', "3way", &state.threeway, |
| 2339 | N_("allow fall back on 3way merging if needed")), |
| 2340 | OPT__QUIET(&state.quiet, N_("be quiet")), |
| 2341 | OPT_SET_INT('s', "signoff", &state.signoff, |
| 2342 | N_("add a Signed-off-by trailer to the commit message"), |
| 2343 | SIGNOFF_EXPLICIT), |
| 2344 | OPT_BOOL('u', "utf8", &state.utf8, |
| 2345 | N_("recode into utf8 (default)")), |
| 2346 | OPT_SET_INT('k', "keep", &state.keep, |
| 2347 | N_("pass -k flag to git-mailinfo"), KEEP_TRUE), |
| 2348 | OPT_SET_INT(0, "keep-non-patch", &state.keep, |
| 2349 | N_("pass -b flag to git-mailinfo"), KEEP_NON_PATCH), |
| 2350 | OPT_BOOL('m', "message-id", &state.message_id, |
| 2351 | N_("pass -m flag to git-mailinfo")), |
| 2352 | OPT_SET_INT(0, "keep-cr", &keep_cr, |
| 2353 | N_("pass --keep-cr flag to git-mailsplit for mbox format"), |
| 2354 | 1), |
| 2355 | OPT_BOOL('c', "scissors", &state.scissors, |
| 2356 | N_("strip everything before a scissors line")), |
| 2357 | OPT_CALLBACK_F(0, "quoted-cr", &state.quoted_cr, N_("action"), |
| 2358 | N_("pass it through git-mailinfo"), |
| 2359 | PARSE_OPT_NONEG, am_option_parse_quoted_cr), |
| 2360 | OPT_PASSTHRU_ARGV(0, "whitespace", &state.git_apply_opts, N_("action"), |
| 2361 | N_("pass it through git-apply"), |
| 2362 | 0), |
| 2363 | OPT_PASSTHRU_ARGV(0, "ignore-space-change", &state.git_apply_opts, NULL, |
| 2364 | N_("pass it through git-apply"), |
| 2365 | PARSE_OPT_NOARG), |
| 2366 | OPT_PASSTHRU_ARGV(0, "ignore-whitespace", &state.git_apply_opts, NULL, |
| 2367 | N_("pass it through git-apply"), |
| 2368 | PARSE_OPT_NOARG), |
| 2369 | OPT_PASSTHRU_ARGV(0, "directory", &state.git_apply_opts, N_("root"), |
nothing calls this directly
no test coverage detected