diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-10-27 12:01:06 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-10-27 14:45:42 +0000 |
commit | 97b1aae251a48af7b85eafd76e5284458d42f181 (patch) | |
tree | 13e9b00b250f23d30621ce041f7a6955ea5f4dc7 /src/blob.cpp | |
parent | Modernize build (diff) | |
download | netfs-gitfs-97b1aae251a48af7b85eafd76e5284458d42f181.tar.bz2 netfs-gitfs-97b1aae251a48af7b85eafd76e5284458d42f181.tar.xz netfs-gitfs-97b1aae251a48af7b85eafd76e5284458d42f181.zip |
Fixes for tidy
Diffstat (limited to 'src/blob.cpp')
-rw-r--r-- | src/blob.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/blob.cpp b/src/blob.cpp index 188c9c5..59e5f83 100644 --- a/src/blob.cpp +++ b/src/blob.cpp @@ -3,7 +3,7 @@ #include "blob.h" #include "repo.h" -GitFS::Blob::Blob(const Repo * const r, const std::string & path) : +GitFS::Blob::Blob(const Repo * const r, std::string && path) : repo(r), entry(Git::TreeEntryByPath(repo->tree, path)), blob(getBlob()), @@ -17,8 +17,12 @@ GitFS::Blob::getBlob() const { const auto mode = git_tree_entry_filemode(entry.get()); - if (S_ISDIR(mode)) throw NetFS::SystemError(EISDIR); - if (S_ISLNK(mode)) throw NetFS::SystemError(ELOOP); + if (S_ISDIR(mode)) { + throw NetFS::SystemError(EISDIR); + } + if (S_ISLNK(mode)) { + throw NetFS::SystemError(ELOOP); + } return Git::BlobLookup(repo->repo, *git_tree_entry_id(entry.get())); } |