]> Kevux Git Server - rit/commit
config: add a repo_config_get_uint() helper
authorAdrian Ratiu <adrian.ratiu@collabora.com>
Fri, 10 Apr 2026 09:05:57 +0000 (12:05 +0300)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Apr 2026 14:58:53 +0000 (07:58 -0700)
commit1c9e5b3fa235e0da6f62359af36afea8e7617074
treefe9a0d7d41dd051a7c7c37bc9a6c8d1144de1fb3
parent8d2ffcf4b4a3a55c56c57c8df617516c25d98380
config: add a repo_config_get_uint() helper

Next commits add a 'hook.jobs' config option of type 'unsigned int',
so add a helper to parse it since the API only supports int and ulong.

An alternative is to make 'hook.jobs' an 'int' or parse it as an 'int'
then cast it to unsigned, however it's better to use proper helpers for
the type. Using 'ulong' is another option which already has helpers, but
it's a bit excessive in size for just the jobs number.

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c
config.h
parse.c
parse.h