config: add 'origin_type' to config_source struct

Use the config origin_type to print more detailed error messages that
inform the user about the origin of a config error (file, stdin, blob).

Helped-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Lars Schneider
2016-02-19 10:16:01 +01:00
committed by Junio C Hamano
parent 7454ee3c62
commit 473166b990
5 changed files with 40 additions and 18 deletions

View File

@ -427,8 +427,8 @@ static const struct submodule *config_from(struct submodule_cache *cache,
parameter.commit_sha1 = commit_sha1;
parameter.gitmodules_sha1 = sha1;
parameter.overwrite = 0;
git_config_from_mem(parse_config, rev.buf, config, config_size,
&parameter);
git_config_from_mem(parse_config, "submodule-blob", rev.buf,
config, config_size, &parameter);
free(config);
switch (lookup_type) {