diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-03-17 15:02:21 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-17 15:02:21 -0700 |
commit | dae477777e5d38780dabb0ebabbfd32fc89c10f6 (patch) | |
tree | 9d445a8e480d1f058a5f75d93805bbc8c56d62bd /submodule.c | |
parent | Merge branch 'es/outside-repo-errmsg-hints' into maint (diff) | |
parent | submodule.c: use get_git_dir() instead of get_git_common_dir() (diff) | |
download | tgif-dae477777e5d38780dabb0ebabbfd32fc89c10f6.tar.xz |
Merge branch 'pb/recurse-submodule-in-worktree-fix' into maint
The "--recurse-submodules" option of various subcommands did not
work well when run in an alternate worktree, which has been
corrected.
* pb/recurse-submodule-in-worktree-fix:
submodule.c: use get_git_dir() instead of get_git_common_dir()
t2405: clarify test descriptions and simplify test
t2405: use git -C and test_commit -C instead of subshells
t7410: rename to t2405-worktree-submodule.sh
Diffstat (limited to 'submodule.c')
-rw-r--r-- | submodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/submodule.c b/submodule.c index 6b867445f0..1385b594fd 100644 --- a/submodule.c +++ b/submodule.c @@ -1811,7 +1811,7 @@ out: void submodule_unset_core_worktree(const struct submodule *sub) { char *config_path = xstrfmt("%s/modules/%s/config", - get_git_common_dir(), sub->name); + get_git_dir(), sub->name); if (git_config_set_in_file_gently(config_path, "core.worktree", NULL)) warning(_("Could not unset core.worktree setting in submodule '%s'"), @@ -1914,7 +1914,7 @@ int submodule_move_head(const char *path, ABSORB_GITDIR_RECURSE_SUBMODULES); } else { char *gitdir = xstrfmt("%s/modules/%s", - get_git_common_dir(), sub->name); + get_git_dir(), sub->name); connect_work_tree_and_git_dir(path, gitdir, 0); free(gitdir); @@ -1924,7 +1924,7 @@ int submodule_move_head(const char *path, if (old_head && (flags & SUBMODULE_MOVE_HEAD_FORCE)) { char *gitdir = xstrfmt("%s/modules/%s", - get_git_common_dir(), sub->name); + get_git_dir(), sub->name); connect_work_tree_and_git_dir(path, gitdir, 1); free(gitdir); } |