Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce cache for mgit #88

Open
pjasiun opened this issue Nov 2, 2018 · 0 comments
Open

Introduce cache for mgit #88

pjasiun opened this issue Nov 2, 2018 · 0 comments

Comments

@pjasiun
Copy link

pjasiun commented Nov 2, 2018

This is an idea which comes to our mind talking with @ma2ciek. With more and more repositories to handle mgit2 bootstrap commands takes more and more time. We could make it faster by introducing local cache for it.

How it could work? Whenever you call mgit bootstrap, mgit first pull to the special system path /global/path/mgit2/cache/name-of-gh-remote. If such folder already exists, mgit only pull, if not, it clones the project. Then it copies .git folder from this special cache to your local folder and install project from that folder. Note that cache needs to keep only .git folder since it contains all files and branches and it has automatic zip compression and garbage collection built in by git.

This way, if multiple projects use the same repositories (what is pretty common case for us) or you call mgit bootstrap (to reinstall your project, to make sure you have clean installation) mgit does not clone the repository, but only pull recent change and copy what should be much faster. Since the cache folder would keep only "clear" repositories, only pull them and execute nothing on them, it should be also pretty safe.

@Mgsy Mgsy added this to the next milestone Jul 16, 2019
@pomek pomek removed this from the nice-to-have milestone Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants