summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-04-10 14:56:03 +0200
committerJunio C Hamano <gitster@pobox.com>2018-04-11 03:43:01 +0200
commit1b70dfd5946f76e40516f2229afbf249f185bc7a (patch)
tree0c265a5e25bbcb5d3e35299c5c06c3570d753d61 /config.c
parentcommit-graph: implement git commit-graph read (diff)
downloadgit-1b70dfd5946f76e40516f2229afbf249f185bc7a.tar.xz
git-1b70dfd5946f76e40516f2229afbf249f185bc7a.zip
commit-graph: add core.commitGraph setting
The commit graph feature is controlled by the new core.commitGraph config setting. This defaults to 0, so the feature is opt-in. The intention of core.commitGraph is that a user can always stop checking for or parsing commit graph files if core.commitGraph=0. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/config.c b/config.c
index b0c20e6cb8..25ee4a676c 100644
--- a/config.c
+++ b/config.c
@@ -1226,6 +1226,11 @@ static int git_default_core_config(const char *var, const char *value)
return 0;
}
+ if (!strcmp(var, "core.commitgraph")) {
+ core_commit_graph = git_config_bool(var, value);
+ return 0;
+ }
+
if (!strcmp(var, "core.sparsecheckout")) {
core_apply_sparse_checkout = git_config_bool(var, value);
return 0;