git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Feb 16, 2016, 22:07 UTC
Message-ID
<56C39D8B.3060700@ramsayjones.plus.com>
In-Reply-To
<20160215174218.GB26443@sigill.intra.peff.net>
On 15/02/16 17:42, Jeff King wrote:
Show 20 quoted lines
> On Mon, Feb 15, 2016 at 11:17:45AM +0100, larsxschneider@gmail.com wrote:
> 
>> From: Lars Schneider <larsxschneider@gmail.com>
>>
>> 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 <larsxschneider@gmail.com>
>> ---
>>  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 <ramsay@ramsayjones.plus.com>
Date: Tue, 16 Feb 2016 21:35:41 +0000
Subject: [PATCH] config: avoid declaration missing prototype warnings
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
 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
Previous: Jeff KingNext: Ramsay Jones
Message 7 of 32 in “config: add '--sources' option to print the source of a config value”
  1. 0/3 config: add '--sources' option to print the source of a config valuelarsxschneider@gmail.com, Feb 15, 2016
  2. 1/3 t: do not hide Git's exit code in testslarsxschneider@gmail.com, Feb 15, 2016
  3. Jeff KingFeb 15, 2016
  4. Lars SchneiderFeb 16, 2016
  5. 2/3 config: add 'type' to config_source struct that identifies config typelarsxschneider@gmail.com, Feb 15, 2016
  6. Jeff KingFeb 15, 2016
  7. Ramsay JonesFeb 16, 2016
  8. Ramsay JonesFeb 15, 2016
  9. Johannes SchindelinFeb 17, 2016
  10. Lars SchneiderFeb 18, 2016
  11. 3/3 config: add '--show-origin' option to print the origin of a config valuelarsxschneider@gmail.com, Feb 15, 2016
  12. Jeff KingFeb 15, 2016
  13. Eric SunshineFeb 15, 2016
  14. Jeff KingFeb 15, 2016
  15. Lars SchneiderFeb 17, 2016
  16. Junio C HamanoFeb 17, 2016
  17. Ramsay JonesFeb 15, 2016
  18. Jeff KingFeb 15, 2016
  19. Ramsay JonesFeb 15, 2016
  20. Lars SchneiderFeb 16, 2016
  21. Ramsay JonesFeb 16, 2016
  22. Jeff KingFeb 16, 2016
  23. Ramsay JonesFeb 16, 2016
  24. Jeff KingFeb 16, 2016
  25. Junio C HamanoFeb 15, 2016
  26. Lars SchneiderFeb 16, 2016
  27. Junio C HamanoFeb 15, 2016
  28. Jeff KingFeb 15, 2016
  29. Junio C HamanoFeb 15, 2016
  30. Lars SchneiderFeb 16, 2016
  31. Jeff KingFeb 15, 2016
  32. Lars SchneiderFeb 16, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.