]> git.ipfire.org Git - thirdparty/git.git/commit
parse-options: add precision handling for OPTION_NEGBIT
authorRené Scharfe <l.s.r@web.de>
Wed, 9 Jul 2025 09:45:53 +0000 (11:45 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Jul 2025 15:39:46 +0000 (08:39 -0700)
commitfeeebbf1b7d5ed8761355d354e9529c791b77e7d
treebf14d162a8587fe24b9cece9a4c4abc21a5245ef
parent5228211c4b92052c0a38f2ab67cd0b87a7baec30
parse-options: add precision handling for OPTION_NEGBIT

Similar to 09705696f7 (parse-options: introduce precision handling for
`OPTION_INTEGER`, 2025-04-17) support value variables of different sizes
for OPTION_NEGBIT.  Do that by requiring their "precision" to be set,
casting their "value" pointer accordingly and checking whether the value
fits.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rebase.c
parse-options.c
parse-options.h