On 11/21, Stefan Beller wrote:
> diff --git a/t/t7412-submodule-interngitdirs.sh 
> b/t/t7412-submodule-interngitdirs.sh
> new file mode 100755
> index 0000000000..8938a4c8b7
> --- /dev/null
> +++ b/t/t7412-submodule-interngitdirs.sh
> @@ -0,0 +1,41 @@
> +#!/bin/sh
> +
> +test_description='Test submodule interngitdirs
> +
> +This test verifies that `git submodue interngitdirs` moves a submodules git
> +directory into the superproject.
> +'
> +
> +. ./test-lib.sh
> +
> +test_expect_success 'setup a real submodule' '
> +     git init sub1 &&
> +     test_commit -C sub1 first &&
> +     git submodule add ./sub1 &&
> +     test_tick &&
> +     git commit -m superproject
> +'
> +
> +test_expect_success 'intern the git dir' '
> +     git submodule interngitdirs &&
> +     test -f sub1/.git &&
> +     test -d .git/modules/sub1 &&
> +     # check that we did not break the repository:
> +     git status
> +'
> +
> +test_expect_success 'setup a gitlink with missing .gitmodules entry' '
> +     git init sub2 &&
> +     test_commit -C sub2 first &&
> +     git add sub2 &&
> +     git commit -m superproject
> +'
> +
> +test_expect_success 'intern the git dir fails for incomplete submodules' '
> +     test_must_fail git submodule interngitdirs &&
> +     # check that we did not break the repository:
> +     git status
> +'
> +
> +test_done
> +

Could we add a test which has nested submodules that need to be
migrated?  Hopfully its just as easy as adding the test :)

-- 
Brandon Williams

Reply via email to