179
N_("pattern"), N_("only decorate refs that match <pattern>")),
180
OPT_STRING_LIST(0, "decorate-refs-exclude", &decorate_refs_exclude,
181
N_("pattern"), N_("do not decorate refs that match <pattern>")),
182
- { OPTION_CALLBACK, 0, "decorate", NULL, NULL, N_("decorate options"),
183
- PARSE_OPT_OPTARG, decorate_callback},
182
+ OPT_CALLBACK_F(0, "decorate", NULL, NULL, N_("decorate options"),
183
+ PARSE_OPT_OPTARG, decorate_callback),
184
OPT_CALLBACK('L', NULL, &line_cb, "n,m:file",
185
N_("Process line range n,m in file, counting from 1"),
186
log_line_range_callback),
1631
int creation_factor = -1;
1632
1633
const struct option builtin_format_patch_options[] = {
1634
- { OPTION_CALLBACK, 'n', "numbered", &numbered, NULL,
1634
+ OPT_CALLBACK_F('n', "numbered", &numbered, NULL,
1635
N_("use [PATCH n/m] even with a single patch"),
1636
- PARSE_OPT_NOARG, numbered_callback },
1637
- { OPTION_CALLBACK, 'N', "no-numbered", &numbered, NULL,
1636
+ PARSE_OPT_NOARG, numbered_callback),
1637
+ OPT_CALLBACK_F('N', "no-numbered", &numbered, NULL,
1638
N_("use [PATCH] even with multiple patches"),
1639
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, no_numbered_callback },
1639
+ PARSE_OPT_NOARG | PARSE_OPT_NONEG, no_numbered_callback),
1640
OPT_BOOL('s', "signoff", &do_signoff, N_("add Signed-off-by:")),
1641
OPT_BOOL(0, "stdout", &use_stdout,
1642
N_("print patches to standard out")),
1650
N_("start numbering patches at <n> instead of 1")),
1651
OPT_INTEGER('v', "reroll-count", &reroll_count,
1652
N_("mark the series as Nth re-roll")),
1653
- { OPTION_CALLBACK, 0, "rfc", &rev, NULL,
1653
+ OPT_CALLBACK_F(0, "rfc", &rev, NULL,
1654
N_("Use [RFC PATCH] instead of [PATCH]"),
1655
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, rfc_callback },
1655
+ PARSE_OPT_NOARG | PARSE_OPT_NONEG, rfc_callback),
1656
OPT_STRING(0, "cover-from-description", &cover_from_description_arg,
1657
N_("cover-from-description-mode"),
1658
N_("generate parts of a cover letter based on a branch's description")),
1659
- { OPTION_CALLBACK, 0, "subject-prefix", &rev, N_("prefix"),
1659
+ OPT_CALLBACK_F(0, "subject-prefix", &rev, N_("prefix"),
1660
N_("Use [<prefix>] instead of [PATCH]"),
1661
- PARSE_OPT_NONEG, subject_prefix_callback },
1662
- { OPTION_CALLBACK, 'o', "output-directory", &output_directory,
1661
+ PARSE_OPT_NONEG, subject_prefix_callback),
1662
+ OPT_CALLBACK_F('o', "output-directory", &output_directory,
1663
N_("dir"), N_("store resulting files in <dir>"),
1664
- PARSE_OPT_NONEG, output_directory_callback },
1665
- { OPTION_CALLBACK, 'k', "keep-subject", &rev, NULL,
1664
+ PARSE_OPT_NONEG, output_directory_callback),
1665
+ OPT_CALLBACK_F('k', "keep-subject", &rev, NULL,
1666
N_("don't strip/add [PATCH]"),
1667
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, keep_callback },
1667
+ PARSE_OPT_NOARG | PARSE_OPT_NONEG, keep_callback),
1668
OPT_BOOL(0, "no-binary", &no_binary_diff,
1669
N_("don't output binary diffs")),
1670
OPT_BOOL(0, "zero-commit", &zero_commit,
1675
N_("show patch format instead of default (patch + stat)"),
1676
1, PARSE_OPT_NONEG),
1677
OPT_GROUP(N_("Messaging")),
1678
- { OPTION_CALLBACK, 0, "add-header", NULL, N_("header"),
1679
- N_("add email header"), 0, header_callback },
1680
- { OPTION_CALLBACK, 0, "to", NULL, N_("email"), N_("add To: header"),
1681
- 0, to_callback },
1682
- { OPTION_CALLBACK, 0, "cc", NULL, N_("email"), N_("add Cc: header"),
1683
- 0, cc_callback },
1684
- { OPTION_CALLBACK, 0, "from", &from, N_("ident"),
1678
+ OPT_CALLBACK(0, "add-header", NULL, N_("header"),
1679
+ N_("add email header"), header_callback),
1680
+ OPT_CALLBACK(0, "to", NULL, N_("email"), N_("add To: header"), to_callback),
1681
+ OPT_CALLBACK(0, "cc", NULL, N_("email"), N_("add Cc: header"), cc_callback),
1682
+ OPT_CALLBACK_F(0, "from", &from, N_("ident"),
1683
N_("set From address to <ident> (or committer ident if absent)"),
1686
- PARSE_OPT_OPTARG, from_callback },
1684
+ PARSE_OPT_OPTARG, from_callback),
1685
OPT_STRING(0, "in-reply-to", &in_reply_to, N_("message-id"),
1686
N_("make first mail a reply to <message-id>")),
1689
- { OPTION_CALLBACK, 0, "attach", &rev, N_("boundary"),
1687
+ OPT_CALLBACK_F(0, "attach", &rev, N_("boundary"),
1688
N_("attach the patch"), PARSE_OPT_OPTARG,
1691
- attach_callback },
1692
- { OPTION_CALLBACK, 0, "inline", &rev, N_("boundary"),
1689
+ attach_callback),
1690
+ OPT_CALLBACK_F(0, "inline", &rev, N_("boundary"),
1691
N_("inline the patch"),
1692
PARSE_OPT_OPTARG | PARSE_OPT_NONEG,
1695
- inline_callback },
1696
- { OPTION_CALLBACK, 0, "thread", &thread, N_("style"),
1693
+ inline_callback),
1694
+ OPT_CALLBACK_F(0, "thread", &thread, N_("style"),
1695
N_("enable message threading, styles: shallow, deep"),
1698
- PARSE_OPT_OPTARG, thread_callback },
1696
+ PARSE_OPT_OPTARG, thread_callback),
1697
OPT_STRING(0, "signature", &signature, N_("signature"),
1698
N_("add a signature")),
1699
OPT_STRING(0, "base", &base_commit, N_("base-commit"),