git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4 4/7] parse-options: rename `OPT_MAGNITUDE()` to `OPT_UNSIGNED()`

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 17, 2025, 15:17 UTC
Message-ID
<xmqqv7r2es1t.fsf@gitster.g>
In-Reply-To
<20250417-b4-pks-parse-options-integers-v4-4-9cbc76b61cfe@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 8 quoted lines
> 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()`.

Very good move. It would have been very confusing if a new developer had to choose between INTEGER and MAGNITUDE, and this change nicely removes that "Huh?" factor.

Thanks.
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 6 of 9 in “parse-options: harden handling of integer values”
  1. 0/7 parse-options: harden handling of integer valuesPatrick Steinhardt, Apr 17, 2025
  2. 1/7 parse: fix off-by-one for minimum signed valuesPatrick Steinhardt, Apr 17, 2025
  3. 2/7 global: use designated initializers for optionsPatrick Steinhardt, Apr 17, 2025
  4. 3/7 parse-options: support unit factors in `OPT_INTEGER()`Patrick Steinhardt, Apr 17, 2025
  5. 4/7 parse-options: rename `OPT_MAGNITUDE()` to `OPT_UNSIGNED()`Patrick Steinhardt, Apr 17, 2025
  6. Junio C HamanoApr 17, 2025
  7. 5/7 parse-options: introduce precision handling for `OPTION_INTEGER`Patrick Steinhardt, Apr 17, 2025
  8. 6/7 parse-options: introduce precision handling for `OPTION_UNSIGNED`Patrick Steinhardt, Apr 17, 2025
  9. 7/7 parse-options: detect mismatches in integer signednessPatrick Steinhardt, Apr 17, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.