diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-10-08 21:07:46 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-08 14:13:11 -0700 |
commit | d342834529495508fa1f23e223d4917cbdcfb54d (patch) | |
tree | 429c000af6a89c165613af5eb94b9ff3815da897 /Documentation/howto/revert-a-faulty-merge.txt | |
parent | parse-options tests: test optname() output (diff) | |
download | tgif-d342834529495508fa1f23e223d4917cbdcfb54d.tar.xz |
parse-options: change OPT_{SHORT,UNSET} to an enum
Change the comparisons against OPT_SHORT and OPT_UNSET to an enum
which keeps track of how a given option got parsed. The case of "0"
was an implicit OPT_LONG, so let's add an explicit label for it.
Due to the xor in 0f1930c5875 (parse-options: allow positivation of
options starting, with no-, 2012-02-25) the code already relied on
this being set back to 0. To avoid refactoring the logic involved in
that let's just start the enum at "0" instead of the usual "1<<0" (1),
but BUG() out if we don't have one of our expected flags.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/howto/revert-a-faulty-merge.txt')
0 files changed, 0 insertions, 0 deletions