From: Junio C Hamano Date: Fri, 25 Apr 2025 00:25:33 +0000 (-0700) Subject: Merge branch 'ps/parse-options-integers' X-Git-Tag: v2.50.0-rc0~81 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2bc5414c411aab33c155b1070b7764ef6a49a02d;p=thirdparty%2Fgit.git 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 --- 2bc5414c411aab33c155b1070b7764ef6a49a02d diff --cc builtin/repack.c index 1fd2874324,8bf9941b2c..59214dbdfd --- a/builtin/repack.c +++ b/builtin/repack.c @@@ -1171,11 -1202,8 +1171,11 @@@ int cmd_repack(int argc PACK_CRUFT), OPT_STRING(0, "cruft-expiration", &cruft_expiration, N_("approxidate"), N_("with --cruft, expire objects older than this")), - OPT_MAGNITUDE(0, "combine-cruft-below-size", - &combine_cruft_below_size, - N_("with --cruft, only repack cruft packs smaller than this")), - OPT_MAGNITUDE(0, "max-cruft-size", &cruft_po_args.max_pack_size, - N_("with --cruft, limit the size of new cruft packs")), ++ OPT_UNSIGNED(0, "combine-cruft-below-size", ++ &combine_cruft_below_size, ++ N_("with --cruft, only repack cruft packs smaller than this")), + OPT_UNSIGNED(0, "max-cruft-size", &cruft_po_args.max_pack_size, + N_("with --cruft, limit the size of new cruft packs")), OPT_BOOL('d', NULL, &delete_redundant, N_("remove redundant packs, and run git-prune-packed")), OPT_BOOL('f', NULL, &po_args.no_reuse_delta,