diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-05-05 14:54:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-05 14:54:27 -0700 |
commit | 66527162008d2792c0000096dd7a41d6d5797df3 (patch) | |
tree | 6eb0708de90242185ee953963ff17086e507ce8f /builtin/rebase.c | |
parent | Merge branch 'jk/test-fail-prereqs-fix' (diff) | |
parent | Use OPT_CALLBACK and OPT_CALLBACK_F (diff) | |
download | tgif-66527162008d2792c0000096dd7a41d6d5797df3.tar.xz |
Merge branch 'dl/opt-callback-cleanup'
Code cleanup.
* dl/opt-callback-cleanup:
Use OPT_CALLBACK and OPT_CALLBACK_F
Diffstat (limited to 'builtin/rebase.c')
-rw-r--r-- | builtin/rebase.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c index 8cbfc5106e..ca6aa0dc7a 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -477,10 +477,10 @@ int cmd_rebase__interactive(int argc, const char **argv, const char *prefix) struct option options[] = { OPT_NEGBIT(0, "ff", &opts.flags, N_("allow fast-forward"), REBASE_FORCE), - { OPTION_CALLBACK, 'k', "keep-empty", &options, NULL, + OPT_CALLBACK_F('k', "keep-empty", &options, NULL, N_("keep commits which start empty"), PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, - parse_opt_keep_empty }, + parse_opt_keep_empty), OPT_BOOL_F(0, "allow-empty-message", &opts.allow_empty_message, N_("allow commits with empty messages"), PARSE_OPT_HIDDEN), @@ -1351,18 +1351,18 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) OPT_CMDMODE(0, "show-current-patch", &action, N_("show the patch file being applied or merged"), ACTION_SHOW_CURRENT_PATCH), - { OPTION_CALLBACK, 0, "apply", &options, NULL, + OPT_CALLBACK_F(0, "apply", &options, NULL, N_("use apply strategies to rebase"), PARSE_OPT_NOARG | PARSE_OPT_NONEG, - parse_opt_am }, - { OPTION_CALLBACK, 'm', "merge", &options, NULL, + parse_opt_am), + OPT_CALLBACK_F('m', "merge", &options, NULL, N_("use merging strategies to rebase"), PARSE_OPT_NOARG | PARSE_OPT_NONEG, - parse_opt_merge }, - { OPTION_CALLBACK, 'i', "interactive", &options, NULL, + parse_opt_merge), + OPT_CALLBACK_F('i', "interactive", &options, NULL, N_("let the user edit the list of commits to rebase"), PARSE_OPT_NOARG | PARSE_OPT_NONEG, - parse_opt_interactive }, + parse_opt_interactive), OPT_SET_INT_F('p', "preserve-merges", &options.type, N_("(DEPRECATED) try to recreate merges instead of " "ignoring them"), @@ -1371,10 +1371,10 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) OPT_CALLBACK_F(0, "empty", &options, "{drop,keep,ask}", N_("how to handle commits that become empty"), PARSE_OPT_NONEG, parse_opt_empty), - { OPTION_CALLBACK, 'k', "keep-empty", &options, NULL, + OPT_CALLBACK_F('k', "keep-empty", &options, NULL, N_("keep commits which start empty"), PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, - parse_opt_keep_empty }, + parse_opt_keep_empty), OPT_BOOL(0, "autosquash", &options.autosquash, N_("move commits that begin with " "squash!/fixup! under -i")), |