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

[PATCH v7 1/2] fixup: config: add 'origin_type' to config_source struct

From
larsxschneider@gmail.com <larsxschneider@gmail.com>
Date
Feb 22, 2016, 09:23 UTC
Message-ID
<1456133026-15355-2-git-send-email-larsxschneider@gmail.com>
In-Reply-To
<1456133026-15355-1-git-send-email-larsxschneider@gmail.com>
From: Lars Schneider <larsxschneider@gmail.com>
---
 config.c               | 4 ++--
 t/t1300-repo-config.sh | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/config.c b/config.c
index 3be2cbc..0fce371 100644
--- a/config.c
+++ b/config.c
@@ -1081,7 +1081,7 @@ static int do_config_from_file(config_fn_t fn,
 
 static int git_config_from_stdin(config_fn_t fn, void *data)
 {
-	return do_config_from_file(fn, "stdin", "", NULL, stdin, data);
+	return do_config_from_file(fn, "standard input", "", NULL, stdin, data);
 }
 
 int git_config_from_file(config_fn_t fn, const char *filename, void *data)
@@ -2392,7 +2392,7 @@ int parse_config_key(const char *var,
 
 const char *current_config_origin_type(void)
 {
-	return cf && cf->origin_type ? cf->origin_type : "cmdline";
+	return cf && cf->origin_type ? cf->origin_type : "command line";
 }
 
 const char *current_config_name(void)
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index e54f6d5..254643a 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -707,7 +707,7 @@ test_expect_success 'invalid unit' '
 '
 
 test_expect_success 'invalid stdin config' '
-	echo "fatal: bad config line 1 in stdin " >expect &&
+	echo "fatal: bad config line 1 in standard input " >expect &&
 	echo "[broken" | test_must_fail git config --list --file - >output 2>&1 &&
 	test_cmp expect output
 '
-- 
2.5.1
Previous: larsxschneider@gmail.comNext: larsxschneider@gmail.com
Message 16 of 17 in “config: add '--sources' option to print the source of a config value”
  1. 0/4 config: add '--sources' option to print the source of a config valuelarsxschneider@gmail.com, Feb 19, 2016
  2. 1/4 t: do not hide Git's exit code in tests using 'nul_to_q'larsxschneider@gmail.com, Feb 19, 2016
  3. 2/4 rename git_config_from_buf to git_config_from_memlarsxschneider@gmail.com, Feb 19, 2016
  4. 3/4 config: add 'origin_type' to config_source structlarsxschneider@gmail.com, Feb 19, 2016
  5. 4/4 config: add '--show-origin' option to print the origin of a config valuelarsxschneider@gmail.com, Feb 19, 2016
  6. Junio C HamanoFeb 22, 2016
  7. Jeff KingFeb 22, 2016
  8. Junio C HamanoFeb 22, 2016
  9. Johannes SixtMar 2, 2016
  10. Lars SchneiderMar 3, 2016
  11. Johannes SixtMar 3, 2016
  12. Johannes SchindelinMar 22, 2016
  13. Lars SchneiderMar 21, 2016
  14. Junio C HamanoFeb 19, 2016
  15. 0/2 config: add '--sources' option to print the source of a config valuelarsxschneider@gmail.com, Feb 22, 2016
  16. 1/2 fixup: config: add 'origin_type' to config_source structlarsxschneider@gmail.com, Feb 22, 2016
  17. 2/2 fixup: config: add '--show-origin' option to print the origin of a config valuelarsxschneider@gmail.com, Feb 22, 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.