Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion builtin/submodule--helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -2519,7 +2519,12 @@ static int ensure_core_worktree(const char *path)
const char *rel_path;
struct strbuf sb = STRBUF_INIT;

cfg_file = repo_git_path(&subrepo, "config");
/* Use config.worktree if it exists, otherwise use config */
cfg_file = repo_git_path(&subrepo, "config.worktree");
if (access(cfg_file, F_OK) != 0) {
free(cfg_file);
cfg_file = repo_git_path(&subrepo, "config");
}

abs_path = absolute_pathdup(path);
rel_path = relative_path(abs_path, subrepo.gitdir, &sb);
Expand Down
Loading