diff options
Diffstat (limited to 'src/blob.cpp')
-rw-r--r-- | src/blob.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/blob.cpp b/src/blob.cpp index 6311b31..4e1b2de 100644 --- a/src/blob.cpp +++ b/src/blob.cpp @@ -1,13 +1,10 @@ -#include <Ice/ObjectAdapter.h> -#include <sys/stat.h> #include "blob.h" #include "repo.h" +#include <Ice/ObjectAdapter.h> +#include <sys/stat.h> GitFS::Blob::Blob(const Repo * const r, std::string && path) : - repo(r), - entry(Git::TreeEntryByPath(repo->tree, path)), - blob(getBlob()), - blobSize(git_blob_rawsize(blob.get())), + repo(r), entry(Git::TreeEntryByPath(repo->tree, path)), blob(getBlob()), blobSize(git_blob_rawsize(blob.get())), blobContent(static_cast<const char *>(git_blob_rawcontent(blob.get()))) { } @@ -28,14 +25,13 @@ GitFS::Blob::getBlob() const } void -GitFS::Blob::close(const ::Ice::Current& current) +GitFS::Blob::close(const ::Ice::Current & current) { current.adapter->remove(current.id); } - NetFS::Attr -GitFS::Blob::fgetattr(ReqEnv, const ::Ice::Current&) +GitFS::Blob::fgetattr(ReqEnv, const ::Ice::Current &) { NetFS::Attr a; a << *blob << *entry << *repo->commit; @@ -44,9 +40,8 @@ GitFS::Blob::fgetattr(ReqEnv, const ::Ice::Current&) return a; } - NetFS::Buffer -GitFS::Blob::read(long long int o, long long int s, const ::Ice::Current&) +GitFS::Blob::read(long long int o, long long int s, const ::Ice::Current &) { const decltype(blobSize) offset(o); const decltype(blobSize) size(s); @@ -57,18 +52,14 @@ GitFS::Blob::read(long long int o, long long int s, const ::Ice::Current&) return NetFS::Buffer(blobContent + offset, blobContent + offset + len); } - void -GitFS::Blob::ftruncate(ReqEnv, long long int, const ::Ice::Current&) +GitFS::Blob::ftruncate(ReqEnv, long long int, const ::Ice::Current &) { throw NetFS::SystemError(EROFS); } - void -GitFS::Blob::write(long long int, long long int, Buffer, const ::Ice::Current&) +GitFS::Blob::write(long long int, long long int, Buffer, const ::Ice::Current &) { throw NetFS::SystemError(EROFS); } - - |