Skip to content

feat: Initial implementation of a git-based FUSE filesystem in Rust#1

Open
terziele wants to merge 1 commit into
mainfrom
initial-gitfuse-implementation
Open

feat: Initial implementation of a git-based FUSE filesystem in Rust#1
terziele wants to merge 1 commit into
mainfrom
initial-gitfuse-implementation

Conversation

@terziele
Copy link
Copy Markdown
Owner

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 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant