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

[PATCH 2/2] pack-refs.c: Add missing call to git_config()

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

At present, 'git pack-refs' 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_pack_refs().

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 builtin/pack-refs.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/builtin/pack-refs.c b/builtin/pack-refs.c
index b20b1ec..ade1ae5 100644
--- a/builtin/pack-refs.c
+++ b/builtin/pack-refs.c
@@ -15,6 +15,9 @@ int cmd_pack_refs(int argc, const char **argv, const char *prefix)
 		OPT_BIT(0, "prune", &flags, N_("prune loose refs (default)"), PACK_REFS_PRUNE),
 		OPT_END(),
 	};
+
+	git_config(git_default_config, NULL);
+
 	if (parse_options(argc, argv, prefix, opts, pack_refs_usage, 0))
 		usage_with_options(pack_refs_usage, opts);
 	return pack_refs(flags);
-- 
1.8.3
Message 1 of 1 in “pack-refs.c: Add missing call to git_config()”
  1. 2/2 pack-refs.c: Add missing call to git_config()Ramsay Jones, Jun 15, 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.