diff mbox series

[09/10] submodule clone: propagate extensions.worktreeConfig

Message ID 20190116103159.9305-10-pclouds@gmail.com (mailing list archive)
State New, archived
Headers show
Series Support using submodules with worktrees | expand

Commit Message

Duy Nguyen Jan. 16, 2019, 10:31 a.m. UTC
If this extension is already enabled on the superproject, the user
likes to use multiple worktrees very much and is already aware of
it. Enable it in submodules too so that when they want to make
secondary submodule worktrees, they will not be worried about enabling
it or migrating per-worktree config away.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 builtin/submodule--helper.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index b5d74cd415..8a12d2f0ed 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1449,6 +1449,7 @@  static int module_clone(int argc, const char **argv, const char *prefix)
 	/* setup alternateLocation and alternateErrorStrategy in the cloned submodule if needed */
 	repo_config_copy(&subrepo, the_repository, "submodule.alternateLocation");
 	repo_config_copy(&subrepo, the_repository, "submodule.alternateErrorStrategy");
+	repo_config_copy(&subrepo, the_repository, "extensions.worktreeConfig");
 
 	repo_clear(&subrepo);
 	strbuf_release(&sb);