summaryrefslogtreecommitdiff
path: root/worktree.c
diff options
context:
space:
mode:
Diffstat (limited to 'worktree.c')
-rw-r--r--worktree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/worktree.c b/worktree.c
index 0782e00..12a766a 100644
--- a/worktree.c
+++ b/worktree.c
@@ -229,6 +229,11 @@ struct worktree *find_worktree(struct worktree **list,
return *list;
}
+int is_main_worktree(const struct worktree *wt)
+{
+ return !wt->id;
+}
+
int is_worktree_being_rebased(const struct worktree *wt,
const char *target)
{