aboutsummaryrefslogtreecommitdiff
path: root/branch.h
diff options
context:
space:
mode:
Diffstat (limited to 'branch.h')
-rw-r--r--branch.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/branch.h b/branch.h
index 58aa45fe7..d3446ed73 100644
--- a/branch.h
+++ b/branch.h
@@ -59,4 +59,12 @@ extern int read_branch_desc(struct strbuf *, const char *branch_name);
*/
extern void die_if_checked_out(const char *branch);
+/*
+ * Check if a per-worktree symref points to a ref in the main worktree
+ * or any linked worktree, and return the path to the exising worktree
+ * if it is. Returns NULL if there is no existing ref. The caller is
+ * responsible for freeing the returned path.
+ */
+extern char *find_shared_symref(const char *symref, const char *target);
+
#endif