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
i need to mount the git repo/tree at a specific commit, for better stability
but, most git servers (including github) have uploadpack.allowReachableSHA1InWant = false (default value)
so fetch-by-commit requires a nontrivial workaround ...
edit: just noticed, on mount, gitfs does a full shallow clone ...
but i need something much more lightweight, which downloads files only on demand.
use case: mount https://github.com/NixOS/nixpkgs = 250 MBytes extracted, of which i only need a few KBytes
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
i need to mount the git repo/tree at a specific commit, for better stability
but, most git servers (including github) have
uploadpack.allowReachableSHA1InWant = false
(default value)so fetch-by-commit requires a nontrivial workaround ...
any plans to support this?
PRs welcome? ; )
related: https://github.com/NixOS/nixpkgs/pull/135545/files
edit: just noticed, on mount, gitfs does a full shallow clone ...
but i need something much more lightweight, which downloads files only on demand.
use case: mount https://github.com/NixOS/nixpkgs = 250 MBytes extracted, of which i only need a few KBytes
related
The text was updated successfully, but these errors were encountered: