summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/merge.c')
-rw-r--r--builtin/merge.c38
1 files changed, 30 insertions, 8 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 9efd585842..ce90e52fe4 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -249,9 +249,16 @@ static struct option builtin_merge_options[] = {
OPT_BOOL(0, "stat", &show_diffstat,
N_("show a diffstat at the end of the merge")),
OPT_BOOL(0, "summary", &show_diffstat, N_("(synonym to --stat)")),
- { OPTION_INTEGER, 0, "log", &shortlog_len, N_("n"),
- N_("add (at most <n>) entries from shortlog to merge commit message"),
- PARSE_OPT_OPTARG, NULL, DEFAULT_MERGE_LOG_LEN },
+ {
+ .type = OPTION_INTEGER,
+ .long_name = "log",
+ .value = &shortlog_len,
+ .precision = sizeof(shortlog_len),
+ .argh = N_("n"),
+ .help = N_("add (at most <n>) entries from shortlog to merge commit message"),
+ .flags = PARSE_OPT_OPTARG,
+ .defval = DEFAULT_MERGE_LOG_LEN,
+ },
OPT_BOOL(0, "squash", &squash,
N_("create a single commit instead of doing a merge")),
OPT_BOOL(0, "commit", &option_commit,
@@ -273,9 +280,16 @@ static struct option builtin_merge_options[] = {
OPT_CALLBACK('m', "message", &merge_msg, N_("message"),
N_("merge commit message (for a non-fast-forward merge)"),
option_parse_message),
- { OPTION_LOWLEVEL_CALLBACK, 'F', "file", &merge_msg, N_("path"),
- N_("read message from file"), PARSE_OPT_NONEG,
- NULL, 0, option_read_message },
+ {
+ .type = OPTION_LOWLEVEL_CALLBACK,
+ .short_name = 'F',
+ .long_name = "file",
+ .value = &merge_msg,
+ .argh = N_("path"),
+ .help = N_("read message from file"),
+ .flags = PARSE_OPT_NONEG,
+ .ll_callback = option_read_message,
+ },
OPT_STRING(0, "into-name", &into_name, N_("name"),
N_("use <name> instead of the real target")),
OPT__VERBOSITY(&verbosity),
@@ -288,8 +302,16 @@ static struct option builtin_merge_options[] = {
OPT_BOOL(0, "allow-unrelated-histories", &allow_unrelated_histories,
N_("allow merging unrelated histories")),
OPT_SET_INT(0, "progress", &show_progress, N_("force progress reporting"), 1),
- { OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key-id"),
- N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
+ {
+ .type = OPTION_STRING,
+ .short_name = 'S',
+ .long_name = "gpg-sign",
+ .value = &sign_commit,
+ .argh = N_("key-id"),
+ .help = N_("GPG sign commit"),
+ .flags = PARSE_OPT_OPTARG,
+ .defval = (intptr_t) "",
+ },
OPT_AUTOSTASH(&autostash),
OPT_BOOL(0, "overwrite-ignore", &overwrite_ignore, N_("update ignored files (default)")),
OPT_BOOL(0, "signoff", &signoff, N_("add a Signed-off-by trailer")),