summaryrefslogtreecommitdiff
path: root/src/repo.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-09-16 18:36:23 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2025-09-16 18:36:23 +0100
commit080ae2e8e02a5fd7d708e50a5c6458ef2a8e3d05 (patch)
tree402a4c492faae8ea42e46eedbbc3ca057171bafc /src/repo.h
parentInclude . and .. in readdir results (diff)
downloadnetfs-gitfs-080ae2e8e02a5fd7d708e50a5c6458ef2a8e3d05.tar.bz2
netfs-gitfs-080ae2e8e02a5fd7d708e50a5c6458ef2a8e3d05.tar.xz
netfs-gitfs-080ae2e8e02a5fd7d708e50a5c6458ef2a8e3d05.zip
Single definition of constructing Attr from git things
Adds getattr helpers to handle logic for setting members from entry and blob if available/appropriate, commit, gid, and uid.
Diffstat (limited to 'src/repo.h')
-rw-r--r--src/repo.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/repo.h b/src/repo.h
index 0087a3f..facf42e 100644
--- a/src/repo.h
+++ b/src/repo.h
@@ -30,6 +30,8 @@ namespace GitFS {
VFS statfs(ReqEnv env, ::std::string path, const ::Ice::Current & ice) override;
int access(ReqEnv env, ::std::string path, int mode, const ::Ice::Current & ice) override;
Attr getattr(ReqEnv env, ::std::string path, const ::Ice::Current & ice) override;
+ [[nodiscard]] Attr getattr(const git_tree_entry *) const;
+ [[nodiscard]] Attr getattr(const git_tree_entry *, const git_blob *) const;
::std::string readlink(ReqEnv env, ::std::string path, const ::Ice::Current & ice) override;
FilePrxPtr open(ReqEnv env, ::std::string path, int flags, const ::Ice::Current & ice) override;
FilePrxPtr create(ReqEnv env, ::std::string path, int flags, int mode, const ::Ice::Current & ice) override;