]> git.ipfire.org Git - thirdparty/git.git/commitdiff
parse-options.h: make the "flags" in "struct option" an enum
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 8 Oct 2021 19:07:41 +0000 (21:07 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Oct 2021 21:13:11 +0000 (14:13 -0700)
Change the "flags" members of "struct option" to refer to their
corresponding "enum" defined earlier in the file.

The benefit of changing this to an enum isn't as great as with some
"enum parse_opt_type" as we'll always check this as a bitfield, so we
can't rely on the compiler checking "case" arms for us. But let's do
it for consistency with the rest of the file.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
parse-options.h

index a1c7c86ad3032ef9e7f815ec0e45f6cca4668685..74b66ba6e935e6d7213c5861e1d89124c756afa7 100644 (file)
@@ -134,7 +134,7 @@ struct option {
        const char *argh;
        const char *help;
 
-       int flags;
+       enum parse_opt_option_flags flags;
        parse_opt_cb *callback;
        intptr_t defval;
        parse_opt_ll_cb *ll_callback;