git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* FUSE fs for git.
@ 2021-02-21 10:12 Stef Bon
  2021-02-25  4:40 ` Ori Bernstein
  2021-02-25  5:32 ` Eric Wong
  0 siblings, 2 replies; 5+ messages in thread
From: Stef Bon @ 2021-02-21 10:12 UTC (permalink / raw)
  To: git

Hi,

I'm working on a network fs mount service for Linux (I call it Open
Secure Network Services, short OSNS) which mounts sftp access on hosts
found in the network (using Avahi) and provides a browseable map to
the user like:

sbon@ws-001 OSNS]$ ls -al /run/network/sbon/fs/Open\ Secure\
Network/bononline.nl/alarm/public
total 3
drwxrwx--- 5 nobody users 4096 Feb 21 05:05  .
drwxr-xr-x 5 root   root  4096 Feb 21 05:04  ..
-rw-r--r-- 1 sbon   users    0 Aug 15  2018  1234
drwxr-xr-x 2 nobody users 4096 Jan 24 04:52  backup
-rw-r--r-- 1 nobody users   21 Feb 21  2017  .bash_logout
-rw-r--r-- 1 nobody users   57 Feb 21  2017  .bash_profile
-rw-r--r-- 1 nobody users  141 Feb 21  2017  .bashrc
drwxr-xr-x 2 nobody users 4096 May 27  2017  Projects
-rw-r--r-- 1 nobody users    4 Jul  1  2017  test
-rw-r--r-- 1 sbon   users   24 Aug  6  2017  test1
-rw-r--r-- 1 sbon   users    4 Aug 10  2017  test2
-rw------- 1 sbon   users    0 Aug 15  2018 'Text File'
-rw------- 1 sbon   users    0 Aug 15  2018 'Text File (1)'
-rw------- 1 sbon   users    0 Aug 15  2018 'Text File (2)'

See: https://github.com/stefbon/OSNS

It supports SFTP (over SSH) versions 3 (used by Openssh) to 6 (latest draft).
Other things I want to add is:
- own sftp client (osns_sftp_subsystem)
- backup on server of user defined directories and files (osns_backup_subsystem)
- next to SFTP also support SMB using libsmb2 by R. Sahlberg for
integration in Windows Networks
- fsnotify support in SFTP and in userland using a specific user agent
like osns_client_user (maybe also in SMB) (support in SFTP means an
extension)
- textchat and/or videochat (osns_chat_subsystem)
- forward connection to server over SSH using a simple api to talk to
osns_client for databases, and something like nx (emulation of
desktop)
- an own server osns_server
- support for use in large environments and roaming users (-> CA, ldap etc)

Now I'm looking it's possible and usefull to add a git fuse fs. The
thing I ask is:

- is there an api I can use (lowlevel and/or highlevel or whatever is
available)?

- is it usefull, in other words is there a serious benefit of a git
filesystem: does it add something?

Any other suggestion is appreciated,

Stef Bon
the Netherlands

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FUSE fs for git.
  2021-02-21 10:12 FUSE fs for git Stef Bon
@ 2021-02-25  4:40 ` Ori Bernstein
  2021-03-01  7:45   ` Stef Bon
  2021-02-25  5:32 ` Eric Wong
  1 sibling, 1 reply; 5+ messages in thread
From: Ori Bernstein @ 2021-02-25  4:40 UTC (permalink / raw)
  To: Stef Bon; +Cc: git

On Sun, 21 Feb 2021 11:12:19 +0100, Stef Bon <stefbon@gmail.com> wrote:
<snip>
> Now I'm looking it's possible and usefull to add a git fuse fs. The
> thing I ask is:
> 
> - is there an api I can use (lowlevel and/or highlevel or whatever is
> available)?

Not provided as part of git, as far as I'm aware,
but there are other options.

You can probably look at what cgit does to abuse
git internals as an API:

	https://git.zx2c4.com/cgit/tree/cgit.h

It may also make sense to lift code from game
of trees:

	http://gameoftrees.org/

There's also libgit2:

	https://libgit2.org/

> - is it usefull, in other words is there a serious benefit of a git
> filesystem: does it add something?

That seems like a question you'd have to ask yourself.
What would you do with it?

For me: I've got a 9p based git file system as part of
my implementation of git[1].  It's convenient for scripts
on top of git, avoiding scratch files or pipeline wrangling.
But on Unix, git already has much of that implemented.

I also tend to open files from old commits or other branches
to peek at how some code evolved.

[1] http://shithub.us/ori/git9/HEAD/info.html

-- 
    Ori Bernstein

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FUSE fs for git.
  2021-02-21 10:12 FUSE fs for git Stef Bon
  2021-02-25  4:40 ` Ori Bernstein
@ 2021-02-25  5:32 ` Eric Wong
  1 sibling, 0 replies; 5+ messages in thread
From: Eric Wong @ 2021-02-25  5:32 UTC (permalink / raw)
  To: Stef Bon; +Cc: git

Stef Bon <stefbon@gmail.com> wrote:
> - is there an api I can use (lowlevel and/or highlevel or whatever is
> available)?

I've used "git cat-file --batch" in many places via pipes.
Git.pm provides a convenient interface for it.
It handles requests like "$REFNAME:$PATHNAME" so it'd be
pretty easy to map FS-like paths to it.

"git fast-import" is also nice if you need write access and
nowadays has "cat-blob" functionality similar to the
aforementioned --batch.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FUSE fs for git.
  2021-02-25  4:40 ` Ori Bernstein
@ 2021-03-01  7:45   ` Stef Bon
  2021-03-01 14:08     ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 5+ messages in thread
From: Stef Bon @ 2021-03-01  7:45 UTC (permalink / raw)
  To: Ori Bernstein; +Cc: git

Thanks a lot Ori.

Especially the link to libgit2 and your own 9p based git filesystem I
appreciate.
What is 9p? Is it a name or something?

Stef Bon
the Netherlands

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FUSE fs for git.
  2021-03-01  7:45   ` Stef Bon
@ 2021-03-01 14:08     ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-03-01 14:08 UTC (permalink / raw)
  To: Stef Bon; +Cc: Ori Bernstein, git


On Mon, Mar 01 2021, Stef Bon wrote:

> Thanks a lot Ori.
>
> Especially the link to libgit2 and your own 9p based git filesystem I
> appreciate.
> What is 9p? Is it a name or something?

https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-01 14:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-21 10:12 FUSE fs for git Stef Bon
2021-02-25  4:40 ` Ori Bernstein
2021-03-01  7:45   ` Stef Bon
2021-03-01 14:08     ` Ævar Arnfjörð Bjarmason
2021-02-25  5:32 ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).