From 6168d85a886286a43b55a0cd6739a1e1e3987d90 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 22 Jul 2019 20:08:39 +0100 Subject: Unline git helpers and throw NetFS exceptions --- src/blob.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/blob.cpp') diff --git a/src/blob.cpp b/src/blob.cpp index 4bd8b15..a3408b3 100644 --- a/src/blob.cpp +++ b/src/blob.cpp @@ -5,24 +5,13 @@ GitFS::Blob::Blob(const Repo * r, const std::string & path) : repo(r), - entry(getTreeEntry(path)), + entry(Git::TreeEntryByPath(repo->tree, path)), blob(getBlob()), blobSize(git_blob_rawsize(blob.get())), blobContent(static_cast(git_blob_rawcontent(blob.get()))) { } -GitFS::Git::TreeEntryPtr -GitFS::Blob::getTreeEntry(const std::string & path) const -{ - try { - return Git::TreeEntryByPath(repo->tree, path); - } - catch (const Git::Error & e) { - Git::ErrorToSystemError(e); - } -} - GitFS::Git::BlobPtr GitFS::Blob::getBlob() const { -- cgit v1.2.3