summaryrefslogtreecommitdiff
path: root/src/dir.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-07-22 20:08:39 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2019-07-22 20:08:39 +0100
commit6168d85a886286a43b55a0cd6739a1e1e3987d90 (patch)
tree36360a309a20b6ab344f25ec80b902d2e27fbad5 /src/dir.cpp
parentBasically all the core functionality (diff)
downloadnetfs-gitfs-6168d85a886286a43b55a0cd6739a1e1e3987d90.tar.bz2
netfs-gitfs-6168d85a886286a43b55a0cd6739a1e1e3987d90.tar.xz
netfs-gitfs-6168d85a886286a43b55a0cd6739a1e1e3987d90.zip
Unline git helpers and throw NetFS exceptions
Diffstat (limited to 'src/dir.cpp')
-rw-r--r--src/dir.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/dir.cpp b/src/dir.cpp
index cee26f0..c590450 100644
--- a/src/dir.cpp
+++ b/src/dir.cpp
@@ -19,14 +19,9 @@ GitFS::Directory::getSubtree() const
subTreeCache = repo->tree;
}
else {
- try {
- auto e = Git::TreeEntryByPath(repo->tree, path);
- if (!S_ISDIR(git_tree_entry_filemode(e.get()))) throw NetFS::SystemError(ENOTDIR);
- subTreeCache = Git::TreeLookup(repo->repo, *git_tree_entry_id(e.get()));
- }
- catch (const Git::Error & e) {
- Git::ErrorToSystemError(e);
- }
+ auto e = Git::TreeEntryByPath(repo->tree, path);
+ if (!S_ISDIR(git_tree_entry_filemode(e.get()))) throw NetFS::SystemError(ENOTDIR);
+ subTreeCache = Git::TreeLookup(repo->repo, *git_tree_entry_id(e.get()));
}
subTreeCacheRootId = *git_tree_id(repo->tree.get());
}