summaryrefslogtreecommitdiff
path: root/worktree.h
diff options
context:
space:
mode:
Diffstat (limited to 'worktree.h')
-rw-r--r--worktree.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/worktree.h b/worktree.h
index 16368588a0..e4bcccdc0a 100644
--- a/worktree.h
+++ b/worktree.h
@@ -31,6 +31,14 @@ struct worktree {
struct worktree **get_worktrees(void);
/*
+ * Like `get_worktrees`, but does not read HEAD. Skip reading HEAD allows to
+ * get the worktree without worrying about failures pertaining to parsing
+ * the HEAD ref. This is useful in contexts where it is assumed that the
+ * refdb may not be in a consistent state.
+ */
+struct worktree **get_worktrees_without_reading_head(void);
+
+/*
* Returns 1 if linked worktrees exist, 0 otherwise.
*/
int submodule_uses_worktrees(const char *path);