diff options
Diffstat (limited to 'worktree.h')
-rw-r--r-- | worktree.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/worktree.h b/worktree.h index 4fcb01348c..ff7b62e434 100644 --- a/worktree.h +++ b/worktree.h @@ -101,6 +101,18 @@ typedef void (* worktree_repair_fn)(int iserr, const char *path, void repair_worktrees(worktree_repair_fn, void *cb_data); /* + * Repair administrative files corresponding to the worktree at the given path. + * The worktree's .git file pointing at the repository must be intact for the + * repair to succeed. Useful for re-associating an orphaned worktree with the + * repository if the worktree has been moved manually (without using "git + * worktree move"). For each repair made or error encountered while attempting + * a repair, the callback function, if non-NULL, is called with the path of the + * worktree and a description of the repair or error, along with the callback + * user-data. + */ +void repair_worktree_at_path(const char *, worktree_repair_fn, void *cb_data); + +/* * Free up the memory for worktree(s) */ void free_worktrees(struct worktree **); |