{"thread":{"id":"55180","subject":"FUSE fs for git.","startedAt":"2021-02-21T10:13:29Z","lastAt":"2021-03-01T14:09:30Z","messageCount":5,"participants":["Stef Bon","Ori Bernstein","Eric Wong","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"417453","messageId":"CANXojcx0TOP9SSr1NgXCddQ3PWze-wBLZA5SRO3YhczqO68u0Q@mail.gmail.com","threadId":"55180","inReplyTo":null,"subject":"FUSE fs for git.","fromName":"Stef Bon","fromEmail":"stefbon@gmail.com","sentAt":"2021-02-21T10:12:19Z","receivedAt":"2021-02-21T10:13:29Z","isPatch":false,"sender":{"key":"stefbon@gmail.com","avatar":null},"body":"Hi,\n\nI'm working on a network fs mount service for Linux (I call it Open\nSecure Network Services, short OSNS) which mounts sftp access on hosts\nfound in the network (using Avahi) and provides a browseable map to\nthe user like:\n\nsbon@ws-001 OSNS]$ ls -al /run/network/sbon/fs/Open\\ Secure\\\nNetwork/bononline.nl/alarm/public\ntotal 3\ndrwxrwx--- 5 nobody users 4096 Feb 21 05:05  .\ndrwxr-xr-x 5 root   root  4096 Feb 21 05:04  ..\n-rw-r--r-- 1 sbon   users    0 Aug 15  2018  1234\ndrwxr-xr-x 2 nobody users 4096 Jan 24 04:52  backup\n-rw-r--r-- 1 nobody users   21 Feb 21  2017  .bash_logout\n-rw-r--r-- 1 nobody users   57 Feb 21  2017  .bash_profile\n-rw-r--r-- 1 nobody users  141 Feb 21  2017  .bashrc\ndrwxr-xr-x 2 nobody users 4096 May 27  2017  Projects\n-rw-r--r-- 1 nobody users    4 Jul  1  2017  test\n-rw-r--r-- 1 sbon   users   24 Aug  6  2017  test1\n-rw-r--r-- 1 sbon   users    4 Aug 10  2017  test2\n-rw------- 1 sbon   users    0 Aug 15  2018 'Text File'\n-rw------- 1 sbon   users    0 Aug 15  2018 'Text File (1)'\n-rw------- 1 sbon   users    0 Aug 15  2018 'Text File (2)'\n\nSee: https://github.com/stefbon/OSNS\n\nIt supports SFTP (over SSH) versions 3 (used by Openssh) to 6 (latest draft).\nOther things I want to add is:\n- own sftp client (osns_sftp_subsystem)\n- backup on server of user defined directories and files (osns_backup_subsystem)\n- next to SFTP also support SMB using libsmb2 by R. Sahlberg for\nintegration in Windows Networks\n- fsnotify support in SFTP and in userland using a specific user agent\nlike osns_client_user (maybe also in SMB) (support in SFTP means an\nextension)\n- textchat and/or videochat (osns_chat_subsystem)\n- forward connection to server over SSH using a simple api to talk to\nosns_client for databases, and something like nx (emulation of\ndesktop)\n- an own server osns_server\n- support for use in large environments and roaming users (-> CA, ldap etc)\n\nNow I'm looking it's possible and usefull to add a git fuse fs. The\nthing I ask is:\n\n- is there an api I can use (lowlevel and/or highlevel or whatever is\navailable)?\n\n- is it usefull, in other words is there a serious benefit of a git\nfilesystem: does it add something?\n\nAny other suggestion is appreciated,\n\nStef Bon\nthe Netherlands\n"},{"id":"417783","messageId":"20210224204007.4937ee80121aa1ed553a2d91@eigenstate.org","threadId":"55180","inReplyTo":"CANXojcx0TOP9SSr1NgXCddQ3PWze-wBLZA5SRO3YhczqO68u0Q@mail.gmail.com","subject":"Re: FUSE fs for git.","fromName":"Ori Bernstein","fromEmail":"ori@eigenstate.org","sentAt":"2021-02-25T04:40:07Z","receivedAt":"2021-02-25T04:48:03Z","isPatch":false,"sender":{"key":"ori@eigenstate.org","avatar":null},"body":"On Sun, 21 Feb 2021 11:12:19 +0100, Stef Bon <stefbon@gmail.com> wrote:\n<snip>\n> Now I'm looking it's possible and usefull to add a git fuse fs. The\n> thing I ask is:\n> \n> - is there an api I can use (lowlevel and/or highlevel or whatever is\n> available)?\n\nNot provided as part of git, as far as I'm aware,\nbut there are other options.\n\nYou can probably look at what cgit does to abuse\ngit internals as an API:\n\n\thttps://git.zx2c4.com/cgit/tree/cgit.h\n\nIt may also make sense to lift code from game\nof trees:\n\n\thttp://gameoftrees.org/\n\nThere's also libgit2:\n\n\thttps://libgit2.org/\n\n> - is it usefull, in other words is there a serious benefit of a git\n> filesystem: does it add something?\n\nThat seems like a question you'd have to ask yourself.\nWhat would you do with it?\n\nFor me: I've got a 9p based git file system as part of\nmy implementation of git[1].  It's convenient for scripts\non top of git, avoiding scratch files or pipeline wrangling.\nBut on Unix, git already has much of that implemented.\n\nI also tend to open files from old commits or other branches\nto peek at how some code evolved.\n\n[1] http://shithub.us/ori/git9/HEAD/info.html\n\n-- \n    Ori Bernstein\n"},{"id":"417785","messageId":"20210225053240.GA10230@dcvr","threadId":"55180","inReplyTo":"CANXojcx0TOP9SSr1NgXCddQ3PWze-wBLZA5SRO3YhczqO68u0Q@mail.gmail.com","subject":"Re: FUSE fs for git.","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2021-02-25T05:32:40Z","receivedAt":"2021-02-25T05:37:17Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Stef Bon <stefbon@gmail.com> wrote:\n> - is there an api I can use (lowlevel and/or highlevel or whatever is\n> available)?\n\nI've used \"git cat-file --batch\" in many places via pipes.\nGit.pm provides a convenient interface for it.\nIt handles requests like \"$REFNAME:$PATHNAME\" so it'd be\npretty easy to map FS-like paths to it.\n\n\"git fast-import\" is also nice if you need write access and\nnowadays has \"cat-blob\" functionality similar to the\naforementioned --batch.\n"},{"id":"418006","messageId":"CANXojczH=r-mugP-zJgrATG5XQUqmoqfY3zUTiZTUDDhx59oJg@mail.gmail.com","threadId":"55180","inReplyTo":"20210224204007.4937ee80121aa1ed553a2d91@eigenstate.org","subject":"Re: FUSE fs for git.","fromName":"Stef Bon","fromEmail":"stefbon@gmail.com","sentAt":"2021-03-01T07:45:16Z","receivedAt":"2021-03-01T07:46:15Z","isPatch":false,"sender":{"key":"stefbon@gmail.com","avatar":null},"body":"Thanks a lot Ori.\n\nEspecially the link to libgit2 and your own 9p based git filesystem I\nappreciate.\nWhat is 9p? Is it a name or something?\n\nStef Bon\nthe Netherlands\n"},{"id":"418037","messageId":"87o8g3j7ax.fsf@evledraar.gmail.com","threadId":"55180","inReplyTo":"CANXojczH=r-mugP-zJgrATG5XQUqmoqfY3zUTiZTUDDhx59oJg@mail.gmail.com","subject":"Re: FUSE fs for git.","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-03-01T14:08:06Z","receivedAt":"2021-03-01T14:09:30Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Mar 01 2021, Stef Bon wrote:\n\n> Thanks a lot Ori.\n>\n> Especially the link to libgit2 and your own 9p based git filesystem I\n> appreciate.\n> What is 9p? Is it a name or something?\n\nhttps://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs\n"}]}