X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=dir.h;h=d2545a7685109688d3ab62143a18e285b3da6119;hb=da62f786d2df60f3c8255cf4cbbcd9c1f9458d99;hp=11a047ba486b81f624fb021418f06cbbd65da676;hpb=d22114ac24fb74486e8ac85ae97ddaa26ad598c2;p=thirdparty%2Fgit.git diff --git a/dir.h b/dir.h index 11a047ba48..d2545a7685 100644 --- a/dir.h +++ b/dir.h @@ -359,7 +359,17 @@ struct untracked_cache *read_untracked_extension(const void *data, unsigned long void write_untracked_extension(struct strbuf *out, struct untracked_cache *untracked); void add_untracked_cache(struct index_state *istate); void remove_untracked_cache(struct index_state *istate); -extern void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir); + +/* + * Connect a worktree to a git directory by creating (or overwriting) a + * '.git' file containing the location of the git directory. In the git + * directory set the core.worktree setting to indicate where the worktree is. + * When `recurse_into_nested` is set, recurse into any nested submodules, + * connecting them as well. + */ +extern void connect_work_tree_and_git_dir(const char *work_tree, + const char *git_dir, + int recurse_into_nested); extern void relocate_gitdir(const char *path, const char *old_git_dir, const char *new_git_dir);