Merge branch 'sg/test-lib-simplify-expr-away' into HEAD
[gitweb.git] / branch.h
index d3446ed73c0c209f0d6b3dc2a7412a643031ea08..d69163daf793f92f3dab92e2fb9bc5217b2dfd6b 100644 (file)
--- a/branch.h
+++ b/branch.h
@@ -43,9 +43,10 @@ void remove_branch_state(void);
 /*
  * Configure local branch "local" as downstream to branch "remote"
  * from remote "origin".  Used by git branch --set-upstream.
+ * Returns 0 on success.
  */
 #define BRANCH_CONFIG_VERBOSE 01
-extern void install_branch_config(int flag, const char *local, const char *origin, const char *remote);
+extern int install_branch_config(int flag, const char *local, const char *origin, const char *remote);
 
 /*
  * Read branch description
@@ -60,11 +61,10 @@ 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.
+ * Update all per-worktree HEADs pointing at the old ref to point the new ref.
+ * This will be used when renaming a branch. Returns 0 if successful, non-zero
+ * otherwise.
  */
-extern char *find_shared_symref(const char *symref, const char *target);
+extern int replace_each_worktree_head_symref(const char *oldref, const char *newref);
 
 #endif