You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I'm not opposed to incorporating something like this directly, but you can probably move on it a lot faster/experiment more if you do it in a different repo and just import the dgit/git library package (as long as you stick to the functions that map directly to git command line functions, I don't foresee the interface changing in any incompatible way any time soon.)
If you want to look into it, Harvey OS has a pure Go 9p package that might be a good place to start: https://github.com/Harvey-OS/ninep. I thought 9front had a hgsrv implementation that you could look into for the filesystem structure inspiration, but I can't find any sign of it right now, so maybe I'm imagining that.
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.
The text was updated successfully, but these errors were encountered: