]> Kevux Git Server - rit/commit
repo: replace get_value_fn_for_key by get_repo_info_field
authorLucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Wed, 25 Feb 2026 16:32:12 +0000 (13:32 -0300)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Feb 2026 19:47:42 +0000 (11:47 -0800)
commit7377a6ef6b9cec293a3f65be7499d5e5ee9c3fae
tree151ffbdd0a9fc319312c3d5cd618f7e4dd71f491
parent3d4e6d319383d31b319227ed099a7dbd0706e165
repo: replace get_value_fn_for_key by get_repo_info_field

Remove the function `get_value_fn_for_key`, which returns a function that
retrieves a value for a certain repo info key. Introduce `get_repo_info_field`
instead, which returns a struct field.

This refactor makes the structure of the function print_fields more consistent
to the function print_all_fields, improving its readability.

Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/repo.c