remote.h: retire CAS_OPT_NAME
When the "--force-with-lease" option was introduced in 28f5d176
(remote.c: add command line option parser for "--force-with-lease",
2013-07-08), the design discussion revolved around the concept of
"compare-and-swap", and it can still be seen in the name used for
variables and helper functions. The end-user facing option name
ended up to be a bit different, so during the development iteration
of the feature, we used this C preprocessor macro to make it easier
to rename it later.
All of that happened more than 10 years ago, and the flexibility
afforded by the CAS_OPT_NAME macro outlived its usefulness. Inline
the constant string for the option name, like all other option names
in the code.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -207,7 +207,7 @@ 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")),
|
||||
OPT_CALLBACK_F(0, CAS_OPT_NAME, &cas, N_("<refname>:<expect>"),
|
||||
OPT_CALLBACK_F(0, "force-with-lease", &cas, N_("<refname>:<expect>"),
|
||||
N_("require old value of ref to be at this value"),
|
||||
PARSE_OPT_OPTARG, parseopt_push_cas_option),
|
||||
OPT_BOOL(0, TRANS_OPT_FORCE_IF_INCLUDES, &force_if_includes,
|
||||
|
Reference in New Issue
Block a user