Skip to content

DGit 9P file server #65

@sirnewton01

Description

@sirnewton01

While DGit aims to be a drop-in replacement for git, especially for Plan 9 that lacks an official git client, there can be more that we can do with this project than just aim for parity.

I think that it would be interesting to have a subcommand that would start a 9P file server for a specified git repository.

Here's a rough proposal:
dgit serve <git repository path>
-Creates a 9P file server at /srv/git that can be mounted

Filesystem structure:
/worktree/ - the current contents of the work tree
/ctl -send git plumbing commands here with some adjustments
/commits/ - access commits as-needed using a ctl file
/log/ - the history of the current branch in ascending order (0, 1, 2, ...)
/branch/ - create and read branch information
/tag/ - create and read tag information

I'm not sure if we should expose object and index files directly from the .git directory.

This would allow anyone to mount a git repository and bind it anywhere they like. Modifications that they make to it can be tracked and committed. The repository can be shared across your processes and network. You can use acme/sam to perform your git operations without using interactive ('win') mode.

It would be nice to try to hook into other plan 9 services and conventions in this server mode. For example, use factotum for authenticating against other servers. Use plumber to bring up editors.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions