]> git.ipfire.org Git - thirdparty/git.git/commit - config.c
config: teach git_config_source to remember its scope
authorMatthew Rogers <mattr94@gmail.com>
Mon, 10 Feb 2020 00:30:57 +0000 (00:30 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Feb 2020 18:49:10 +0000 (10:49 -0800)
commite37efa40e122c4408c89c437e8a375df2147feac
tree027006df788dfefee7b2fcd28846728ae37e7613
parent5c105a842eae59a3271f5db861ef8d85de6bc2f8
config: teach git_config_source to remember its scope

There are many situations where the scope of a config command is known
beforehand, such as passing of '--local', '--file', etc. to an
invocation of git config.  However, this information is lost when moving
from builtin/config.c to /config.c.  This historically hasn't been a big
deal, but to prepare for the upcoming --show-scope option we teach
git_config_source to keep track of the source and the config machinery
to use that information to set current_parsing_scope appropriately.

Signed-off-by: Matthew Rogers <mattr94@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/config.c
config.c
config.h