MCPcopy Index your code
hub / github.com/git/git / repair_worktrees

Function repair_worktrees

worktree.c:708–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706}
707
708void repair_worktrees(worktree_repair_fn fn, void *cb_data, int use_relative_paths)
709{
710 struct worktree **worktrees = get_worktrees_internal(1);
711 struct worktree **wt = worktrees + 1; /* +1 skips main worktree */
712
713 if (!fn)
714 fn = repair_noop;
715 for (; *wt; wt++)
716 repair_gitfile(*wt, fn, cb_data, use_relative_paths);
717 free_worktrees(worktrees);
718}
719
720void repair_worktree_after_gitdir_move(struct worktree *wt, const char *old_path)
721{

Callers 1

repairFunction · 0.85

Calls 3

get_worktrees_internalFunction · 0.85
repair_gitfileFunction · 0.85
free_worktreesFunction · 0.85

Tested by

no test coverage detected