MCPcopy Create free account
hub / github.com/git/git / is_dir_prefix

Function is_dir_prefix

tree-diff.c:51–55  ·  view source on GitHub ↗

Returns true if and only if "dir" is a leading directory of "path" */

Source from the content-addressed store, hash-verified

49
50/* Returns true if and only if "dir" is a leading directory of "path" */
51static int is_dir_prefix(const char *path, const char *dir, int dirlen)
52{
53 return !strncmp(path, dir, dirlen) &&
54 (!path[dirlen] || path[dirlen] == '/');
55}
56
57static int check_recursion_depth(const struct strbuf *name,
58 const struct pathspec *ps,

Callers 1

check_recursion_depthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected