[PATCH 05/10] submodule update: add tests for multiple worktrees
- From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
- Date
- Jan 16, 2019, 10:31 UTC
- Message-ID
- <20190116103159.9305-6-pclouds@gmail.com>
- In-Reply-To
- <20190116103159.9305-1-pclouds@gmail.com>
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@gmail.com> --- 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