This variable contains the subtree. With core_subtree being non-empty behavior of git may be totally different. Perhaps this should not stay in .git/config, rather .git/subtree Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> --- cache.h | 1 + config.c | 3 +++ environment.c | 2 ++ 3 files changed, 6 insertions(+), 0 deletions(-) diff --git a/cache.h b/cache.h index c9fa3df..04ebe6e 100644 --- a/cache.h +++ b/cache.h @@ -551,6 +551,7 @@ extern int read_replace_refs; extern int fsync_object_files; extern int core_preload_index; extern int core_apply_sparse_checkout; +extern const char *core_subtree; enum safe_crlf { SAFE_CRLF_FALSE = 0, diff --git a/config.c b/config.c index cdcf583..86ded29 100644 --- a/config.c +++ b/config.c @@ -595,6 +595,9 @@ static int git_default_core_config(const char *var, const char *value) return 0; } + if (!strcmp(var, "core.subtree")) + return git_config_string(&core_subtree, var, value); + /* Add other config variables here and to Documentation/config.txt. */ return 0; } diff --git a/environment.c b/environment.c index 83d38d3..1365dd0 100644 --- a/environment.c +++ b/environment.c @@ -57,6 +57,8 @@ int core_apply_sparse_checkout; /* Parallel index stat data preload? */ int core_preload_index = 0; +const char *core_subtree; + /* This is set by setup_git_dir_gently() and/or git_default_config() */ char *git_work_tree_cfg; static char *work_tree; -- 1.7.1.rc1.69.g24c2f7 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html