Skip to content

Commit

Permalink
api-parse-options.txt: fix description of OPT_CMDMODE
Browse files Browse the repository at this point in the history
The description of the 'OPT_CMDMODE' macro states that "enum_val is
set to int_var when ...", but it's the other way around, 'int_var' is
set to 'enum_val'.  Fix this.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
szeder authored and gitster committed Aug 19, 2022
1 parent c1b117d commit 80882bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/technical/api-parse-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ There are some macros to easily define options:
`OPT_CMDMODE(short, long, &int_var, description, enum_val)`::
Define an "operation mode" option, only one of which in the same
group of "operating mode" options that share the same `int_var`
can be given by the user. `enum_val` is set to `int_var` when the
can be given by the user. `int_var` is set to `enum_val` when the
option is used, but an error is reported if other "operating mode"
option has already set its value to the same `int_var`.

Expand Down

0 comments on commit 80882bc

Please sign in to comment.