Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-04-22 16:01:27 +0300
committerJunio C Hamano <gitster@pobox.com>2016-04-23 00:09:37 +0300
commitd3b9ac07eb44974bb619d71fc6c81c9f2036b96c (patch)
treeff18f60eb58addac7e2a2008d4d9f1aa43ad3b30 /worktree.h
parent69dfe3b9420eb2a7f479a0a4cad663111af2b1f9 (diff)
worktree.c: make find_shared_symref() return struct worktree *
This gives the caller more information and they can answer things like, "is it the main worktree" or "is it the current worktree". The latter question is needed for the "checkout a rebase branch" case later. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'worktree.h')
-rw-r--r--worktree.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/worktree.h b/worktree.h
index 3198c8da2a..ca50e73b58 100644
--- a/worktree.h
+++ b/worktree.h
@@ -35,10 +35,10 @@ extern void free_worktrees(struct worktree **);
/*
* 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.
+ * or any linked worktree, and return the worktree that holds the ref,
+ * or NULL otherwise. The result may be destroyed by the next call.
*/
-extern char *find_shared_symref(const char *symref, const char *target);
+extern const struct worktree *find_shared_symref(const char *symref,
+ const char *target);
#endif