Yoichi Nakayama's cover letter says submodule settings in the repository config are shared by all worktrees even when they need to differ. One example is branches that point the same submodule at an upstream repository or at a fork. A more serious one is that sharing submodule.<name>.gitdir makes submodule worktrees share a HEAD and index, even when the superproject worktrees record different submodule commits.

The series has three patches. The first keeps submodule.<name>.gitdir relative, since repo_git_path_append() can produce an absolute path in a linked worktree or when GIT_DIR is absolute. A relative path keeps working when the worktree is moved with the main worktree. The author notes that this benefit also requires worktree.useRelativePaths to be true.

The second patch stores settings such as submodule.<name>.active and submodule.<name>.url in the worktree config when extensions.worktreeConfig is enabled. Settings that are meant to be shared can stay in the repository config. When one exists there, 'git submodule deinit' sets submodule.<name>.active to false in the worktree config.

The third patch changes 'git submodule init'. It copies an existing gitdir setting into the worktree config only if the setting belongs to the current worktree, and otherwise generates a new one. It warns when it declines to copy a setting. Another posted patch, in the thread's excerpts, uses strbuf_realpath_forgiving so that a GIT_DIR containing symlinks no longer yields a non-canonical gitdir path.

The excerpts do not show what reviewers, including Junio Hamano, asked for, so the state of review is unclear.