Merge branch 'sg/help-group'
[gitweb.git] / branch.h
index 64173abf4db65b0a8e71c1c8880f97a3350306f7..d3446ed73c0c209f0d6b3dc2a7412a643031ea08 100644 (file)
--- a/branch.h
+++ b/branch.h
@@ -52,4 +52,19 @@ extern void install_branch_config(int flag, const char *local, const char *origi
  */
 extern int read_branch_desc(struct strbuf *, const char *branch_name);
 
+/*
+ * Check if a branch is checked out in the main worktree or any linked
+ * worktree and die (with a message describing its checkout location) if
+ * it is.
+ */
+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