After discussions I came to basically same as v1.
* Resubmitting the 2 patches which have not been taken to worktrees reroll -
they fix visible issue. Mostly unchanged except small cleanup in test.
* Added GIT_COMMON_DIR to local_repo_env. While it is obviously a right
thing, I wasn't able to observe any change in behavior.
Max Kirillov (3):
submodule refactor: use git_path_submodule() in add_submodule_odb()
path: implement common_dir handling in git_path_submodule()
Add GIT_COMMON_DIR to local_repo_env
cache.h | 1 +
environment.c | 1 +
path.c | 24 ++++++++++++++++++++----
setup.c | 17 ++++++++++++-----
submodule.c | 28 ++++++++++------------------
t/t7410-submodule-checkout-to.sh | 10 ++++++++++
6 files changed, 54 insertions(+), 27 deletions(-)