From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id D3A271F9FD for ; Thu, 25 Feb 2021 04:49:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234175AbhBYEr5 (ORCPT ); Wed, 24 Feb 2021 23:47:57 -0500 Received: from mimir.eigenstate.org ([206.124.132.107]:43590 "EHLO mimir.eigenstate.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235096AbhBYEro (ORCPT ); Wed, 24 Feb 2021 23:47:44 -0500 X-Greylist: delayed 404 seconds by postgrey-1.27 at vger.kernel.org; Wed, 24 Feb 2021 23:47:44 EST Received: from oneeye (pool-108-41-92-79.nycmny.fios.verizon.net [108.41.92.79]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 77f4bc9d (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Wed, 24 Feb 2021 20:40:09 -0800 (PST) Date: Wed, 24 Feb 2021 20:40:07 -0800 From: Ori Bernstein To: Stef Bon Cc: git@vger.kernel.org Subject: Re: FUSE fs for git. Message-Id: <20210224204007.4937ee80121aa1ed553a2d91@eigenstate.org> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Sun, 21 Feb 2021 11:12:19 +0100, Stef Bon wrote: > 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