Skip to contentSkip to conversation

pack-refs.c: Add missing call to git_config()

PATCH In review Ramsay Jones 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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

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().

---
 builtin/pack-refs.c | 3 +++
 1 file changed, 3 insertions(+)
builtin/pack-refs.c +3 -0
index b20b1ec..ade1ae5 100644
@@ -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);
Signature · 1 line
1.8.3