feat: Initial implementation of a git-based FUSE filesystem in Rust#1
Open
terziele wants to merge 1 commit into
Open
feat: Initial implementation of a git-based FUSE filesystem in Rust#1terziele wants to merge 1 commit into
terziele wants to merge 1 commit into
Conversation
This commit introduces the foundational structure and functionality for GitFuse, a FUSE filesystem that exposes a Git repository. Key features implemented: - Project setup with `fuse-mt`, `git2`, `libc`, and `env_logger`. - Basic FUSE operations: `init`, `destroy`, `getattr`, `lookup`, `readdir`, and `read`. - Git integration: The filesystem opens a specified Git repository on `init`. - Directory listing: `readdir` lists files and directories from the HEAD commit's root tree. - File reading: `read` can read the content of a hardcoded file path (e.g., "README.md") from the repository. - Command-line argument parsing: Accepts repository path and mount point using `clap`. - Basic FUSE mounting logic in the `main` function. - Placeholder unit tests. Current limitations and future work: - Inode management is very basic and needs a robust mapping between paths/OIDs and inodes. - `read` operation is limited to a hardcoded file; it needs to work with dynamic paths based on inodes. - `lookup` and `getattr` need to handle nested paths and more complex scenarios. - Error handling can be improved. - More comprehensive tests, including integration tests, are needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces the foundational structure and functionality for GitFuse, a FUSE filesystem that exposes a Git repository.
Key features implemented:
fuse-mt,git2,libc, andenv_logger.init,destroy,getattr,lookup,readdir, andread.init.readdirlists files and directories from the HEAD commit's root tree.readcan read the content of a hardcoded file path (e.g., "README.md") from the repository.clap.mainfunction.Current limitations and future work:
readoperation is limited to a hardcoded file; it needs to work with dynamic paths based on inodes.lookupandgetattrneed to handle nested paths and more complex scenarios.