summaryrefslogtreecommitdiffstats
path: root/worktree.h
diff options
context:
space:
mode:
Diffstat (limited to 'worktree.h')
-rw-r--r--worktree.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/worktree.h b/worktree.h
index e961186216..fd040f5d99 100644
--- a/worktree.h
+++ b/worktree.h
@@ -215,4 +215,17 @@ void strbuf_worktree_ref(const struct worktree *wt,
*/
int init_worktree_config(struct repository *r);
+/**
+ * Write the .git file and gitdir file that links the worktree to the repository.
+ *
+ * The `dotgit` parameter is the path to the worktree's .git file, and `gitdir`
+ * is the path to the repository's `gitdir` file.
+ *
+ * Example
+ * dotgit: "/path/to/foo/.git"
+ * gitdir: "/path/to/repo/worktrees/foo/gitdir"
+ */
+void write_worktree_linking_files(struct strbuf dotgit, struct strbuf gitdir,
+ int use_relative_paths);
+
#endif