# Re: \[PATCH 02/10\] parse-options.\[ch\]: consistently use "enum parse\_opt\_flags"

- From: Junio C Hamano \<hidden\>
- Date: 2021-09-29 16:02:57 
- List: git
- Page: https://ratatoskr.run/git/2021/09/7904026
- Thread: https://ratatoskr.run/git/2021/09/7904026/t.md

```text
Ævar Arnfjörð Bjarmason  [ref] writes:

> Use the "enum parse_opt_flags" instead of an "int flags" as arguments
> ...

> @@ -861,7 +864,7 @@ int parse_options(int argc, const char **argv, const char *prefix,
>  	case PARSE_OPT_NON_OPTION:
>  	case PARSE_OPT_DONE:
>  		break;
> -	default: /* PARSE_OPT_UNKNOWN */
> +	case PARSE_OPT_UNKNOWN:
>  		if (ctx.argv[0][1] == '-') {
>  			error(_("unknown option `%s'"), ctx.argv[0] + 2);
>  		} else if (isascii(*ctx.opt)) {

This part does not belong to this step or 03/10 (parse_opt_result).
It belongs to 04/10 (drop default from switching on enum).
```
