From: Junio C Hamano Date: Tue, 15 Apr 2025 17:02:08 GMT Subject: Re: [PATCH v2 5/5] parse-options: detect mismatches in integer signedness Message-ID: In-Reply-To: <20250415-b4-pks-parse-options-integers-v2-5-ce07441a1f01@pks.im> Patrick Steinhardt writes: > Address the systemic issue by introducing two new build asserts > `BARF_UNLESS_SIGNED()` and `BARF_UNLESS_UNSIGNED()`. As the names > already hint at, those macros will cause a compiler error when passed a > value that is not signed or unsigned, respectively. > > Adapt `OPT_INTEGER()`, `OPT_UNSIGNED()` as well as `OPT_MAGNITUDE()` to > use those asserts. This uncovers a small set of sites where we indeed > have the same bug as in git-backfill(1). Adapt all of them to use the > correct option. Nicely described and implemented. Thanks.