From ac6c561b598ae74d8e752e22607194536000e4db Mon Sep 17 00:00:00 2001 From: Michael Rappazzo Date: Fri, 2 Oct 2015 07:55:31 -0400 Subject: worktree: add top-level worktree.c worktree.c contains functions to work with and get information from worktrees. This introduction moves functions related to worktrees from branch.c into worktree.c Signed-off-by: Michael Rappazzo Signed-off-by: Junio C Hamano --- worktree.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 worktree.h (limited to 'worktree.h') diff --git a/worktree.h b/worktree.h new file mode 100644 index 0000000000..71b14092c4 --- /dev/null +++ b/worktree.h @@ -0,0 +1,12 @@ +#ifndef WORKTREE_H +#define WORKTREE_H + +/* + * 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 -- cgit v1.2.3