parse-options: rename OPT_MAGNITUDE() to OPT_UNSIGNED()

With the preceding commit, `OPT_INTEGER()` has learned to support unit
factors. Consequently, the major differencen between `OPT_INTEGER()` and
`OPT_MAGNITUDE()` isn't the support of unit factors anymore, as both of
them do support them now. Instead, the difference is that one handles
signed and the other handles unsigned integers.

Adapt the name of `OPT_MAGNITUDE()` accordingly by renaming it to
`OPT_UNSIGNED()`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-04-17 12:49:39 +02:00
committed by Junio C Hamano
parent 8ff1a34bdf
commit 785c17df78
9 changed files with 47 additions and 47 deletions

View File

@@ -191,7 +191,7 @@ static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p,
optname(opt, flags));
return 0;
case OPTION_MAGNITUDE:
case OPTION_UNSIGNED:
if (unset) {
*(unsigned long *)opt->value = 0;
return 0;
@@ -656,7 +656,7 @@ static void show_negated_gitcomp(const struct option *opts, int show_all,
case OPTION_STRING:
case OPTION_FILENAME:
case OPTION_INTEGER:
case OPTION_MAGNITUDE:
case OPTION_UNSIGNED:
case OPTION_CALLBACK:
case OPTION_BIT:
case OPTION_NEGBIT:
@@ -708,7 +708,7 @@ static int show_gitcomp(const struct option *opts, int show_all)
case OPTION_STRING:
case OPTION_FILENAME:
case OPTION_INTEGER:
case OPTION_MAGNITUDE:
case OPTION_UNSIGNED:
case OPTION_CALLBACK:
if (opts->flags & PARSE_OPT_NOARG)
break;