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

Function dir_prefix

path.c:59–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59int dir_prefix(const char *buf, const char *dir)
60{
61 size_t len = strlen(dir);
62 return !strncmp(buf, dir, len) &&
63 (is_dir_sep(buf[len]) || buf[len] == '\0');
64}
65
66/* $buf =~ m|$dir/+$file| but without regex */
67static int is_dir_file(const char *buf, const char *dir, const char *file)

Callers 2

adjust_git_pathFunction · 0.85
add_tree_entriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected