Subject: Re: [PATCH v4 2/3] config: add 'type' to config_source struct that identifies config type

From: Ramsay Jones <[email-masked]>
Date: Tue, 16 Feb 2016 22:07:07 +0000

On 15/02/16 17:42, Jeff King wrote:
> On Mon, Feb 15, 2016 at 11:17:45AM +0100, [email-masked] wrote:
> 
>> From: Lars Schneider <[email-masked]>
>>
>> Use the config type to print more detailed error messages that inform
>> the user about the origin of a config error (file, stdin, blob).
>>
>> Signed-off-by: Lars Schneider <[email-masked]>
>> ---
>>  cache.h                |  6 ++++--
>>  config.c               | 36 +++++++++++++++++++++++++-----------
>>  submodule-config.c     |  4 ++--
>>  t/t1300-repo-config.sh |  8 +++++++-
>>  t/t1308-config-set.sh  |  4 ++--
>>  5 files changed, 40 insertions(+), 18 deletions(-)
> 
> Looks good to me.
> 
> -Peff
> 

Hi Lars,

Could you please squash this into your patch.

Thanks!

ATB,
Ramsay Jones

-- >8 --
From: Ramsay Jones <[email-masked]>
Date: Tue, 16 Feb 2016 21:35:41 +0000
Subject: [PATCH] config: avoid declaration missing prototype warnings

Signed-off-by: Ramsay Jones <[email-masked]>
---
 cache.h  | 4 ++--
 config.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cache.h b/cache.h
index 3ff94dc..7f1fa65 100644
--- a/cache.h
+++ b/cache.h
@@ -1546,8 +1546,8 @@ extern const char *get_log_output_encoding(void);
 extern const char *get_commit_output_encoding(void);
 
 extern int git_config_parse_parameter(const char *, config_fn_t fn, void *data);
-extern const char *current_config_type();
-extern const char *current_config_name();
+extern const char *current_config_type(void);
+extern const char *current_config_name(void);
 
 struct config_include_data {
 	int depth;
diff --git a/config.c b/config.c
index f1efba8..0a35323 100644
--- a/config.c
+++ b/config.c
@@ -2414,12 +2414,12 @@ int parse_config_key(const char *var,
 	return 0;
 }
 
-const char *current_config_type()
+const char *current_config_type(void)
 {
 	return cf && cf->type ? cf->type : "cmdline";
 }
 
-const char *current_config_name()
+const char *current_config_name(void)
 {
 	return cf && cf->name ? cf->name : "";
 }
-- 
2.7.0