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

Function have_same_root

path.c:926–934  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

924}
925
926static int have_same_root(const char *path1, const char *path2)
927{
928 int is_abs1, is_abs2;
929
930 is_abs1 = is_absolute_path(path1);
931 is_abs2 = is_absolute_path(path2);
932 return (is_abs1 && is_abs2 && tolower(path1[0]) == tolower(path2[0])) ||
933 (!is_abs1 && !is_abs2);
934}
935
936/*
937 * Give path as relative to prefix.

Callers 1

relative_pathFunction · 0.85

Calls 1

is_absolute_pathFunction · 0.85

Tested by

no test coverage detected