gitfs icon indicating copy to clipboard operation
gitfs copied to clipboard

Should allow shallow clone of the git repo (i.e. --depth 1)

Open Kimi-Arthur opened this issue 6 years ago • 3 comments

It takes quite a while to clone a big project (with long history), while maybe only HEAD is needed.

In general, configuring clone/pull/push options may be very helpful.

Kimi-Arthur avatar Jan 04 '18 09:01 Kimi-Arthur

Thank suggestion! A -o clone_depth=N can be added.

vtemian avatar Jan 04 '18 17:01 vtemian

That will suffice for me. But general option for clone may be even more useful.

Anyway, clone_depth will be cool!

Kimi-Arthur avatar Jan 04 '18 20:01 Kimi-Arthur

I would also like to have clone_depth option.

As well making mounted file system either read-only, or any writes to it, not do any commits / pushes (instead preserve any changes locally in tmpfs or other backing storage). Or maybe this can be accomplished by stacking overlayfs on top of gitfs and tmpfs.

This would be rather nifty for running continuous integration testing using gitfs. They don't need full repo, or write access. In fact they shouldn't have write access, and on unmount all local modifications should be gone.

It is still not 100% optimal, as mounting even with clone_depth=1 will still do a lot of fetching which can take quite a bit of time. A specialized TCP server that exports read only view of git repo, that can be used maybe with nfs, sshfs or 9p network file system is another interesting option. This way mounting would be instantaneous, caching can be achieved on the client, and only files that are actually read will be fetched, and probably faster than using git fetch.

baryluk avatar May 29 '20 06:05 baryluk