Stefan Beller <[email protected]> writes:
> +interngitdirs::
> + Move the git directory of submodules into its superprojects
> + `$GIT_DIR/modules` path and then connect the git directory and
> + its working directory by setting the `core.worktree` and adding
> + a .git file pointing to the git directory interned into the
> + superproject.
> ++
> + A repository that was cloned independently and later added
> + as a submodule or old setups have the submodules git directory
> + inside the submodule instead of the
> ++
> + This command is recursive by default.
Does this format correctly?
I somehow thought that second and subsequent paragraphs continued
with "+" want no indentation before them. See for example the
Values section in config.txt and see how entries for boolean:: and
color:: use multiple '+' paragraphs.
If we do not have to refrain from indenting the second and
subsequent paragraphs, that would be great for readability, but I
take the existing practice as telling me that we cannot do that X-<.
> +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
> +'
It is not clear what the last "git status" wants to test. In the
extreme, if the failed "git submodule" command did
rm -fr .git ?* && git init
wouldn't "git status" still succeed?
What are the minimum things that we expect from "did not break" to
see? sub2/.git is still a directory and is a valid repository? The
contents of the .git/modules/* before and after the "git submodule"
does not change? Some other things?