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

Function find_worktree

worktree.c:262–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262struct worktree *find_worktree(struct worktree **list,
263 const char *prefix,
264 const char *arg)
265{
266 struct worktree *wt;
267 char *to_free = NULL;
268
269 if ((wt = find_worktree_by_suffix(list, arg)))
270 return wt;
271
272 if (prefix)
273 arg = to_free = prefix_filename(prefix, arg);
274 wt = find_worktree_by_path(list, arg);
275 free(to_free);
276 return wt;
277}
278
279struct worktree *find_worktree_by_path(struct worktree **list, const char *p)
280{

Callers 4

lock_worktreeFunction · 0.85
unlock_worktreeFunction · 0.85
move_worktreeFunction · 0.85
remove_worktreeFunction · 0.85

Calls 3

find_worktree_by_suffixFunction · 0.85
prefix_filenameFunction · 0.85
find_worktree_by_pathFunction · 0.85

Tested by

no test coverage detected