Coder Social home page Coder Social logo

Comments (1)

milahu avatar milahu commented on May 27, 2024

lazy fetch only needed files

this is solved in google's slothfs (aka gitfs), but only works with "Gerrit/Gitiles based Git hosting" = no github

background: access monorepos from thin clients

the tree contains a significant amount of unused data

no github

on github, we can use api.github.com to browse commits and trees
and use raw.githubusercontent.com to fetch blobs

this works well for small projects, where only few files are actually needed (syscalls: read, readdir, stat, attr)
for larger projects, this can be too slow, so git clone becomes more attractive

pin git repo to commit hash

the goal here is file-deduplication on fat clients.
fat client = the full git repo was fetched with some depth (mostly-shallow clone),
so we have local access to old versions

what i want is something like this:

gitfs interface

/commit/:sha/tree/ -> root directory by commit sha
/tree/:sha/ -> root directory by tree sha (can be a subfolder of the repo)
/blob/:sha -> file by blob sha

sample:

$ gitfs mount https://github.com/presslabs/gitfs.git /tmp/demo
$ cd /tmp/demo
$ less commit/12886ec5b9c7e103bfcab0cd37a8333873382fae/tree/README.md

this would show exactly this file:

https://github.com/presslabs/gitfs/blob/12886ec5b9c7e103bfcab0cd37a8333873382fae/README.md
https://raw.githubusercontent.com/presslabs/gitfs/12886ec5b9c7e103bfcab0cd37a8333873382fae/README.md

from gitfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.