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/send-pack.c | |
| parent | e34acbdc43056f2070a44b660c2e89121cf4bd18 (diff) | |
| parent | 203c85339fb51bb8b83aae8f0adde44d6e55e018 (diff) | |
| download | git-66527162008d2792c0000096dd7a41d6d5797df3.tar.gz | |
Merge branch 'dl/opt-callback-cleanup'
Code cleanup.
* dl/opt-callback-cleanup:
Use OPT_CALLBACK and OPT_CALLBACK_F
Diffstat (limited to 'builtin/send-pack.c')
| -rw-r--r-- | builtin/send-pack.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/builtin/send-pack.c b/builtin/send-pack.c index f2c5a34402..2b9610f121 100644 --- a/builtin/send-pack.c +++ b/builtin/send-pack.c @@ -165,9 +165,8 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix) OPT_BOOL('n' , "dry-run", &dry_run, N_("dry run")), OPT_BOOL(0, "mirror", &send_mirror, N_("mirror all refs")), OPT_BOOL('f', "force", &force_update, N_("force updates")), - { OPTION_CALLBACK, - 0, "signed", &push_cert, "(yes|no|if-asked)", N_("GPG sign the push"), - PARSE_OPT_OPTARG, option_parse_push_signed }, + OPT_CALLBACK_F(0, "signed", &push_cert, "(yes|no|if-asked)", N_("GPG sign the push"), + PARSE_OPT_OPTARG, option_parse_push_signed), OPT_STRING_LIST(0, "push-option", &push_options, N_("server-specific"), N_("option to transmit")), @@ -177,10 +176,9 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix) OPT_BOOL(0, "stateless-rpc", &stateless_rpc, N_("use stateless RPC protocol")), OPT_BOOL(0, "stdin", &from_stdin, N_("read refs from stdin")), OPT_BOOL(0, "helper-status", &helper_status, N_("print status from remote helper")), - { OPTION_CALLBACK, - 0, CAS_OPT_NAME, &cas, N_("<refname>:<expect>"), + OPT_CALLBACK_F(0, CAS_OPT_NAME, &cas, N_("<refname>:<expect>"), N_("require old value of ref to be at this value"), - PARSE_OPT_OPTARG, parseopt_push_cas_option }, + PARSE_OPT_OPTARG, parseopt_push_cas_option), OPT_END() }; |
