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

Method openTextFile

plugins/vcs/GitModule.cpp:27–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27ArchiveTextFilePtr GitModule::openTextFile(const std::string& vcsUri)
28{
29 try
30 {
31 assert(getVcsPrefix(vcsUri) == UriPrefix);
32
33 if (!_repository)
34 {
35 return ArchiveTextFilePtr();
36 }
37
38 auto tree = _repository->getTreeByRevision(vcs::getVcsRevision(vcsUri));
39
40 return tree->openTextFile(vcs::getVcsFilePath(vcsUri), *_repository);
41 }
42 catch (const git::GitException& ex)
43 {
44 rWarning() << "git::openTextFile failed: " << ex.what() << std::endl;
45 return ArchiveTextFilePtr();
46 }
47}
48
49const std::string& GitModule::getName() const
50{

Callers

nothing calls this directly

Calls 6

getVcsPrefixFunction · 0.85
getVcsRevisionFunction · 0.85
getVcsFilePathFunction · 0.85
rWarningFunction · 0.85
getTreeByRevisionMethod · 0.80
whatMethod · 0.80

Tested by

no test coverage detected