Junio C Hamano <gitster@xxxxxxxxx> writes: > ... > And the extent of the design of > > echo "gitdir: $there" >.git && git config core.worktree "$(pwd)" > > is to work with the locations of these two places as they are set up. > Moving one or the other or both may or may not work without adjusting to > what you did. If you "mv $there $newlocation" (the repository) behind > Git's back, you may need to update .git to point at the new location of > the repository. If you move your working tree woth "mv", you may need to > update core.worktree to point at the new location of the working tree. > And until you do so things may not work. That is why we do not explicitly > say "you can move them to arbitrary places without telling git and things > will work"---because that is not the case. Just to avoid any misunderstanding, I still agree with the overall goal of the original patch to allow moving the whole superproject tree, including its submodule repositories in its .git/modules/, and the working trees of itself and its submodules. It is a narrow special case with a very well defined relative relationships between the working tree of submodules and the repositories that control them, and having them point to each other with relative paths will make any post-move adjustments unnecessary, unlike more general unconstrained uses of the "gitdir: $there" mechanism. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html