| 25 | } |
| 26 | |
| 27 | ArchiveTextFilePtr 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 | |
| 49 | const std::string& GitModule::getName() const |
| 50 | { |
nothing calls this directly
no test coverage detected