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

The `regexp` variable is used by the `format_config()` callback when
`CONFIG_FLAGS_FIXED_VALUE` is not set. 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