Thread (1 message) 1 message, 1 author, 2021-09-29

Re: [PATCH 10/10] parse-options: change OPT_{SHORT,UNSET} to an enum

From: Junio C Hamano <hidden>
Date: 2021-09-29 00:51:04

Ævar Arnfjörð Bjarmason  [off-list ref] writes:
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.
I think this is going backwards.  If we want to change anything in
this area, you may

 (1) spell the values not as 1 and 2 but as bit-shifts (1U<<0),
     (1U<<1), and

 (2) turn "flags" into "unsigned".

but I do not think of a reason why it would be a good move to use
enum for "these are bits", for the same reason as my comments on
[2/10].

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help