9 /* Functions for acting on the information about worktrees. */
12 * Get the worktrees. The primary worktree will always be the first returned,
13 * and linked worktrees will be pointed to by 'next' in each subsequent
14 * worktree. No specific ordering is done on the linked worktrees.
16 * The caller is responsible for freeing the memory from the returned
19 extern struct worktree
**get_worktrees(void);
22 * Free up the memory for worktree(s)
24 extern void free_worktrees(struct worktree
**);
27 * Check if a per-worktree symref points to a ref in the main worktree
28 * or any linked worktree, and return the path to the exising worktree
29 * if it is. Returns NULL if there is no existing ref. The caller is
30 * responsible for freeing the returned path.
32 extern char *find_shared_symref(const char *symref
, const char *target
);