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

[PATCH 1/2] show-ref.c: Add missing call to git_config()

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Jun 15, 2013, 20:29 UTC
Message-ID
<51BCCE98.3070201@ramsay1.demon.co.uk>

At present, 'git show-ref' ignores any attempt to set config variables (e.g. core.checkstat) from the command line using the -c option to git. In order to enable such usage, add the missing call to git_config() from cmd_show_ref().

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 builtin/show-ref.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 8d9b76a..95f5ca9 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -191,6 +191,8 @@ int cmd_show_ref(int argc, const char **argv, const char *prefix)
 	if (argc == 2 && !strcmp(argv[1], "-h"))
 		usage_with_options(show_ref_usage, show_ref_options);
 
+	git_config(git_default_config, NULL);
+
 	argc = parse_options(argc, argv, prefix, show_ref_options,
 			     show_ref_usage, PARSE_OPT_NO_INTERNAL_HELP);
 
-- 
1.8.3
Next: Junio C Hamano
Message 1 of 5 in “show-ref.c: Add missing call to git_config()”
  1. 1/2 show-ref.c: Add missing call to git_config()Ramsay Jones, Jun 15, 2013
  2. Junio C HamanoJun 17, 2013
  3. Ramsay JonesJun 18, 2013
  4. Junio C HamanoJul 1, 2013
  5. Ramsay JonesJul 4, 2013

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.