diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-07-16 09:42:28 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-16 09:42:28 -0700 |
| commit | 0fd2a2ec142af06aa46343bcb053206043b14308 (patch) | |
| tree | 4d8f368941adfeab16464534c36b5fcf620d77fc /builtin/am.c | |
| parent | Merge branch 'ps/doc-pack-refs-auto-with-files-backend-fix' (diff) | |
| parent | parse-options: add precision handling for OPTION_COUNTUP (diff) | |
| download | git-0fd2a2ec142af06aa46343bcb053206043b14308.tar.gz git-0fd2a2ec142af06aa46343bcb053206043b14308.zip | |
Merge branch 'rs/parse-options-precision'
Define .precision to more canned parse-options type to avoid bugs
coming from using a variable with a wrong type to capture the
parsed values.
* rs/parse-options-precision:
parse-options: add precision handling for OPTION_COUNTUP
parse-options: add precision handling for OPTION_BITOP
parse-options: add precision handling for OPTION_NEGBIT
parse-options: add precision handling for OPTION_BIT
parse-options: add precision handling for OPTION_SET_INT
parse-options: add precision handling for PARSE_OPT_CMDMODE
parse-options: require PARSE_OPT_NOARG for OPTION_BITOP
Diffstat (limited to 'builtin/am.c')
| -rw-r--r-- | builtin/am.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/am.c b/builtin/am.c index a800003340..c9d925f7b9 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -2406,6 +2406,7 @@ int cmd_am(int argc, .type = OPTION_CALLBACK, .long_name = "show-current-patch", .value = &resume_mode, + .precision = sizeof(resume_mode), .argh = "(diff|raw)", .help = N_("show the patch being applied"), .flags = PARSE_OPT_CMDMODE | PARSE_OPT_OPTARG | PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP, |
