MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / getRepositoryRelativePath

Method getRepositoryRelativePath

plugins/vcs/Repository.cpp:58–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58std::string Repository::getRepositoryRelativePath(const std::string& path)
59{
60 if (!os::fileOrDirExists(path))
61 {
62 return ""; // doesn't exist
63 }
64
65 auto relativePath = os::getRelativePath(path, getPath());
66
67 if (relativePath == path)
68 {
69 return ""; // outside VCS
70 }
71
72 return relativePath;
73}
74
75std::shared_ptr<Repository> Repository::clone()
76{

Callers 7

analyseRemoteStatusFunction · 0.80
tryToFinishMergeFunction · 0.80
performFastForwardFunction · 0.80
syncWithRemoteFunction · 0.80
onMapEventMethod · 0.80

Calls 2

fileOrDirExistsFunction · 0.85
getRelativePathFunction · 0.85

Tested by

no test coverage detected