builtin/config: pull out function to handle config location
commit9dda6b72b77df40da288e1a33452fd5625944ebe
authorPatrick Steinhardt <ps@pks.im>
Mon, 6 May 2024 08:56:14 +0000 (6 10:56 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 May 2024 18:50:08 +0000 (6 11:50 -0700)
treefc506304827f1beca7c6e2f8d2bd039b0babb9a6
parentdaa33250240406fd0ff9dfc7625b3784138a8978
builtin/config: pull out function to handle config location

There's quite a bunch of options to git-config(1) that allow the user to
specify which config location to use when reading or writing config
options. The logic to handle this is thus by necessity also quite
involved.

Pull it out into a separate function so that we can reuse it in
subsequent commits which introduce proper subcommands.

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