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

Function is_dir_file

path.c:67–75  ·  view source on GitHub ↗

$buf =~ m|$dir/+$file| but without regex */

Source from the content-addressed store, hash-verified

65
66/* $buf =~ m|$dir/+$file| but without regex */
67static int is_dir_file(const char *buf, const char *dir, const char *file)
68{
69 int len = strlen(dir);
70 if (strncmp(buf, dir, len) || !is_dir_sep(buf[len]))
71 return 0;
72 while (is_dir_sep(buf[len]))
73 len++;
74 return !strcmp(buf + len, file);
75}
76
77static void replace_dir(struct strbuf *buf, int len, const char *newdir)
78{

Callers 1

adjust_git_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected