mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'ps/parse-options-integers'
Update parse-options API to catch mistakes to pass address of an integral variable of a wrong type/size. * ps/parse-options-integers: parse-options: detect mismatches in integer signedness parse-options: introduce precision handling for `OPTION_UNSIGNED` parse-options: introduce precision handling for `OPTION_INTEGER` parse-options: rename `OPT_MAGNITUDE()` to `OPT_UNSIGNED()` parse-options: support unit factors in `OPT_INTEGER()` global: use designated initializers for options parse: fix off-by-one for minimum signed values
This commit is contained in:
@@ -111,8 +111,16 @@ int cmd_commit_tree(int argc,
|
||||
OPT_CALLBACK_F('F', NULL, &buffer, N_("file"),
|
||||
N_("read commit log message from file"), PARSE_OPT_NONEG,
|
||||
parse_file_arg_callback),
|
||||
{ OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key-id"),
|
||||
N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
|
||||
{
|
||||
.type = OPTION_STRING,
|
||||
.short_name = 'S',
|
||||
.long_name = "gpg-sign",
|
||||
.value = &sign_commit,
|
||||
.argh = N_("key-id"),
|
||||
.help = N_("GPG sign commit"),
|
||||
.flags = PARSE_OPT_OPTARG,
|
||||
.defval = (intptr_t) "",
|
||||
},
|
||||
OPT_END()
|
||||
};
|
||||
int ret;
|
||||
|
||||
Reference in New Issue
Block a user