Subject: [PATCH 05/10] submodule update: add tests for multiple worktrees

From: Nguyễn Thái Ngọc Duy <[email-masked]>
Date: Wed, 16 Jan 2019 17:31:54 +0700

There are no changes needed for 'submodule update'. The clones will be
per-worktree and all the support is already in place. Add a test to
make sure it actually works.

Signed-off-by: Nguyễn Thái Ngọc Duy <[email-masked]>
---
 t/t2405-worktree-submodules.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/t/t2405-worktree-submodules.sh b/t/t2405-worktree-submodules.sh
index 2ee3e2d039..c1b19ad613 100755
--- a/t/t2405-worktree-submodules.sh
+++ b/t/t2405-worktree-submodules.sh
@@ -67,4 +67,15 @@ test_expect_success 'init submodules' '
 	! test -d cloned/.git/worktrees/secondary/modules/sub2
 '
 
+test_expect_success 'update submodules' '
+	(
+		cd cloned &&
+		git submodule update sub1 &&
+		cd secondary &&
+		git submodule update sub2
+	) &&
+	test -d cloned/.git/modules/sub1 &&
+	test -d cloned/.git/worktrees/secondary/modules/sub2
+'
+
 test_done
-- 
2.20.0.482.g66447595a7