summaryrefslogtreecommitdiff
path: root/t/helper/test-regex.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-05-15 08:42:58 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-15 07:17:56 -0700
commit040b141df39a952af936abf73f4e2fa5fc9954b5 (patch)
tree51fe4d988c112536e78787ff7d76617e87e106c2 /t/helper/test-regex.c
parentfdfaaa1b68f61eccd7423da558e9c69e3c7bb908 (diff)
builtin/config: convert `key` to a local variable
The `key` variable is used by the `get_value()` function for two purposes: - It is used to store the result of `git_config_parse_key()`, which is then passed on to `collect_config()`. - It is used as a store to convert the provided key to an all-lowercase key when `use_key_regexp` is set. Neither of these cases warrant a global variable at all. In the former case we can pass the key via `struct collect_config_data`. And in the latter case we really only want to have it as a temporary local variable such that we can free associated memory. Refactor the code accordingly to reduce our reliance on global state. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-regex.c')
0 files changed, 0 insertions, 0 deletions