diff options
author | Jacob Keller <jacob.keller@gmail.com> | 2017-04-19 02:08:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-19 19:12:18 -0700 |
commit | 5563131f9ae4d2f087238c03634796d1993927d1 (patch) | |
tree | 490f075cecba928fb4457dd2dd64cadfa5bc7c5b /submodule-config.h | |
parent | 49800c940790cc7465d1b03e08d472ffd8684808 (diff) | |
download | git-5563131f9ae4d2f087238c03634796d1993927d1.tar.gz |
parse-options: disallow double-negations of options starting with no-
Many options can be negated by prefixing the option with "no-", for
example "--3way" can be prefixed with "--no-3way" to disable it. Since
0f1930c58754 ("parse-options: allow positivation of options
starting, with no-", 2012-02-25) we have also had support to negate
options which start with "no-" by using the positive wording.
This leads to the confusing (and non-documented) case that you can still
prefix options beginning with "no-" by a second "no-" to negate them.
That is, we allow "no-no-hardlinks" to negate the "no-hardlinks" option.
This can be confusing to the user so lets just disallow the
double-negative forms. If the long_name begins with "no-" then we simply
don't allow the regular negation format, and only allow the option to be
negated by the positive form.
Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule-config.h')
0 files changed, 0 insertions, 0 deletions