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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <pclouds@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux