]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/config: convert `value_pattern` to a local variable
authorPatrick Steinhardt <ps@pks.im>
Wed, 15 May 2024 06:42:44 +0000 (08:42 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 May 2024 14:17:55 +0000 (07:17 -0700)
commitbfe45f83e7a7815cbaea04f380cd807c18c088ea
treeca4880d3b0c32cac1b812862af0c2726d585a29f
parent65d197cffc7ad52c61398c2579efa988779cc7ab
builtin/config: convert `value_pattern` to a local variable

The `value_pattern` variable is used by the `format_config()` callback
when `CONFIG_FLAGS_FIXED_VALUE` is used. It is only ever set up by its
only caller, `collect_config()` and can thus easily be moved into the
`collect_config_data` structure.

Do so to remove our reliance on global state.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/config.c